{smcl}
{com}{sf}{ul off}{txt}{.-}
      name:  {res}<unnamed>
       {txt}log:  {res}R:\WSV2\TBu_BMa\Subsidies Project\Results\Identifying_Treated_Models.smcl
  {txt}log type:  {res}smcl
 {txt}opened on:  {res}15 Sep 2023, 10:35:48
{txt}
{com}. set more off
{txt}
{com}. 
. 
. *gen date=ym(year,month)
. *format date %tm
. 
. *********************************************************************************
. ***IDENTIFYING TREATED MODELS IN DATA********************************************
. **This part of the do file generates the variable S_i, or a dummy for eligibility
. *********************************************************************************
. replace model=subinstr(model, " ","",.)
{txt}(987,681 real changes made)

{com}. 
. replace model=subinstr(model, "-","",.)
{txt}(112,364 real changes made)

{com}. 
. replace model=subinstr(model, "/","",.)
{txt}(103,357 real changes made)

{com}. 
. replace model=subinstr(model, ")","",.)
{txt}(10,114 real changes made)

{com}. 
. replace model=subinstr(model, "(","",.)
{txt}(10,102 real changes made)

{com}. 
. replace model=subinstr(model, ".","",.)
{txt}(17,968 real changes made)

{com}. 
. replace model=subinstr(model, "&","",.)
{txt}(162 real changes made)

{com}. 
. ***********************************************************************************************
. ***CROATIA*************************************************************************************
. **All treated washing machines, freezers, and refrigerators identified by energy label of A+++
. **Subsidy programs in June and October 2015
. ***********************************************************************************************
. 
. gen     treatc=0                if (category=="freezer"|category=="refrigerator"|category=="washing machine")
{txt}
{com}. 
. replace treatc=1                if energy_label_eu=="A+++"  & (category=="freezer"|category=="refrigerator"|category=="washing machine")
{txt}(361,729 real changes made)

{com}. 
. codebook id                     if treatc== 1

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}6,138{col 51}{txt}Missing "": {res}0{txt}/{res}361,729

{txt}{col 15}Examples: {res}"35659515"
{col 25}"65882770"
{col 25}"78437727"
{col 25}"89148116"
{txt}
{com}. 
. codebook id                     if treatc== 1 & year==2015 & country=="Croatia"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}343{col 51}{txt}Missing "": {res}0{txt}/{res}4,116

{txt}{col 15}Examples: {res}"64933455"
{col 25}"79716607"
{col 25}"85691435"
{col 25}"92646405"
{txt}
{com}. codebook id                     if treatc== 0 & year==2015 & country=="Croatia"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}1,513{col 51}{txt}Missing "": {res}24{txt}/{res}18,180

{txt}{col 15}Examples: {res}"56151748"
{col 25}"72148647"
{col 25}"78800150"
{col 25}"87484737"
{txt}
{com}. 
. 
. 
. **********************************************************************************************
. ***AUSTRIA************************************************************************************
. **Washing machines, merge by model number from eligibility list
. **Subsidy program in 2010
. **********************************************************************************************
. merge m:m model country  using   "R:\WSV2\TBu_BMa\Subsidies Project\Data Subsidies\Austria\Eligible WM Austria.dta"
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}       4,184,963
{txt}{col 9}from master{col 30}{res}       4,184,943{txt}  (_merge==1)
{col 9}from using{col 30}{res}              20{txt}  (_merge==2)

{col 5}Matched{col 30}{res}           5,160{txt}  (_merge==3)
{col 5}{hline 41}

{com}. 
. drop if _merge==2
{txt}(20 observations deleted)

{com}. 
. ***MANUALLY CHECKING UNMACHED MODELS"
. 
. *                                 "DST10166PG"
. replace treata=1                if model=="DST10166P"           
{txt}(12 real changes made)

{com}. *                                 "LAVAMAT74650H"
. replace treata=1                if model=="OKOLAVAMAT74650H"
{txt}(48 real changes made)

{com}. replace treata=1                if model=="LAVAMAT74650"        
{txt}(60 real changes made)

{com}. *                                 "LAVAMAT74959A3"
. replace treata=1                if model=="LAVAMAT74959A"       
{txt}(0 real changes made)

{com}. *                                 "LAVAMAT86950A"
. replace treata=1                if model=="OEKO_LAVAMAT86950A"
{txt}(60 real changes made)

{com}. replace treata=1                if model=="LAVAMAT86950A3"      
{txt}(60 real changes made)

{com}. *                                 "LAVAMATÖKOPLUS14"
. replace treata=1                if model=="OEKOPLUS14"          
{txt}(12 real changes made)

{com}. replace treata=1                if model=="W5000WPS"            
{txt}(60 real changes made)

{com}. replace treata=1                if model=="ECOW5000WPS"         
{txt}(60 real changes made)

{com}. replace treata=1                if model=="W5000WPSSUPERTRONIC"  
{txt}(144 real changes made)

{com}. replace treata=1                if model=="W5825WPS"            
{txt}(192 real changes made)

{com}. *                                 "W6000WPSW6546WPS"
. replace treata=1                if model=="W6546WPS"            
{txt}(144 real changes made)

{com}. replace treata=1                if model=="ECOW6000WPS"         
{txt}(84 real changes made)

{com}. *                                 "W6544WPSECO"
. replace treata=1                if model=="W6544WPS"            
{txt}(120 real changes made)

{com}. *                                 "W6749WPSLIQUIDWASHECO"
. replace treata=1                if model=="W6749WPSLIQUIDWASH" 
{txt}(156 real changes made)

{com}. *                                 "WA74124"
. *                                 "WA74144"
. *                                 "WA74164"                                                             
. *                                 "WAB1200WS"
. replace treata=1                if model=="WAB1200"             
{txt}(48 real changes made)

{com}. replace treata=1                if model=="WAB1200SW"           
{txt}(0 real changes made)

{com}. *                                 "WAF9312P"
. *                                 "WAI7312"
. replace treata=1                if model=="WAI7312A"            
{txt}(36 real changes made)

{com}. *                                 "WAPLATINUMXLE"
. replace treata=1                if model=="WAPLATINUMXXLE"      
{txt}(0 real changes made)

{com}. *                                 "WAPLXL94FLD"
. *                                 "WAS28491"
. *                                 "WM12E492"
. *                                 "WM260100"
. replace treata=1                if model=="LAVAMAT75854A"       
{txt}(48 real changes made)

{com}. replace treata=1                if model=="LAVAMAT74650LE"      
{txt}(24 real changes made)

{com}. replace treata=1                if model=="WAPLUS616DI"         
{txt}(24 real changes made)

{com}. replace treata=1                if model=="WAPLUS614DI"         
{txt}(48 real changes made)

{com}. replace treata=1                if model=="WAPLUS612DI"         
{txt}(36 real changes made)

{com}. replace treata=1                if model=="WAP64602"            
{txt}(36 real changes made)

{com}. replace treata=1                if model=="WAE284H2MAXX7ECOSPAR" 
{txt}(24 real changes made)

{com}. replace treata=1                if model=="IWD71482B"           
{txt}(108 real changes made)

{com}. replace treata=1                if model=="W1747WPSECOLINE" 
{txt}(24 real changes made)

{com}. replace treata=1                if model=="WF9824"                      
{txt}(36 real changes made)

{com}. replace treata=1                if model=="WM14E4R1"            
{txt}(36 real changes made)

{com}. replace treata=1                if model=="M14E4F3"             
{txt}(0 real changes made)

{com}. 
. 
. replace treata=0                if treata!=1  & category=="washing machine" 
{txt}(1,334,962 real changes made)

{com}. 
. codebook id                     if treata==1 & year==2010 & country=="Austria"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str8

{col 10}Unique values: {res}134{col 51}{txt}Missing "": {res}0{txt}/{res}1,608

{txt}{col 15}Examples: {res}"50311947"
{col 25}"53162833"
{col 25}"53445543"
{col 25}"55710657"
{txt}
{com}. codebook id                     if treata==0 & year==2010 & country=="Austria"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}1,017{col 51}{txt}Missing "": {res}12{txt}/{res}12,216

{txt}{col 15}Examples: {res}"32988134"
{col 25}"38552730"
{col 25}"50674205"
{col 25}"56134522"
{txt}
{com}. tab category                    if treata==1

       {txt}category {c |}      Freq.     Percent        Cum.
{hline 16}{c +}{hline 35}
washing machine {c |}{res}      6,900      100.00      100.00
{txt}{hline 16}{c +}{hline 35}
          Total {c |}{res}      6,900      100.00
{txt}
{com}. 
. 
. drop _merge
{txt}
{com}. 
. 
. 
. **********************************************************************************************
. ***AUSTRIA************************************************************************************
. **Refrigerators and freezers, identification of treated models by energy label of A++
. **Subsidy programs in 2009 and 2010
. **********************************************************************************************
. 
. gen     treataf=0           if (category=="freezer"|category=="refrigerator")
{txt}(1,341,862 missing values generated)

{com}. replace treataf=1               if energy_label_eu=="A++" & (category=="freezer"|category=="refrigerator")
{txt}(509,281 real changes made)

{com}. 
. codebook id                     if treataf==1 & year==2009 & country=="Austria"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}408{col 51}{txt}Missing "": {res}0{txt}/{res}4,896

{txt}{col 15}Examples: {res}"35054816"
{col 25}"39458681"
{col 25}"49845994"
{col 25}"53328369"
{txt}
{com}. codebook id                     if treataf==0 & year==2009 & country=="Austria"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}2,929{col 51}{txt}Missing "": {res}24{txt}/{res}35,172

{txt}{col 15}Examples: {res}"26542447"
{col 25}"30783759"
{col 25}"37346481"
{col 25}"50424926"
{txt}
{com}. 
. codebook id                     if treataf==1 & year==2010 & country=="Austria"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}565{col 51}{txt}Missing "": {res}0{txt}/{res}6,780

{txt}{col 15}Examples: {res}"37375373"
{col 25}"49517072"
{col 25}"53329022"
{col 25}"55885050"
{txt}
{com}. codebook id                     if treataf==0 & year==2010 & country=="Austria"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}2,600{col 51}{txt}Missing "": {res}24{txt}/{res}31,224

{txt}{col 15}Examples: {res}"28443767"
{col 25}"33989811"
{col 25}"42982428"
{col 25}"53266223"
{txt}
{com}. 
. 
. **********************************************************************************************
. ***HUNGARY************************************************************************************
. **Washing machines, merge by model number from eligibility list
. **Subsidy program in 2015
. **********************************************************************************************
. 
. merge m:m model  country   using "R:\WSV2\TBu_BMa\Subsidies Project\Data Subsidies\Hungary\Treated models HU WM 2015.dta"
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}       4,175,423
{txt}{col 9}from master{col 30}{res}       4,175,362{txt}  (_merge==1)
{col 9}from using{col 30}{res}              61{txt}  (_merge==2)

{col 5}Matched{col 30}{res}          14,741{txt}  (_merge==3)
{col 5}{hline 41}

{com}. drop if _merge==2
{txt}(61 observations deleted)

{com}. 
. 
. ***MANUALLY CHECKING FOR UNMATCHED MODELS***
. 
. *                                         "AWOC0614beépíthető"
. replace treath=1                if model=="AWOC0614"            
{txt}(73 real changes made)

{com}. *                                 "AWOC0714beépíthető"
. replace treath=1                if model=="AWOC0714"            
{txt}(61 real changes made)

{com}. *                                     "AWOE91200"                                                       
. *                                 "ECOS6L1052EU"
. replace treath=1                if model=="ECOS6L1052"          
{txt}(36 real changes made)

{com}. *                                 "ESFA5101V1EE"
. replace treath=1                if model=="ESFA5101W1EE"        
{txt}(0 real changes made)

{com}. *                                 "ESFA6102A2EN"
. replace treath=1                if model=="ESFA6102A2"          
{txt}(60 real changes made)

{com}. *                                 "ESFB7124W2EE"
. replace treath=1                if model=="ESFB7124W2"          
{txt}(25 real changes made)

{com}. *                                 "ESFB7144W3EE"
. replace treath=1                if model=="ESFB7144W3"          
{txt}(13 real changes made)

{com}. *                                 "ESFD8145W5EE"
. replace treath=1                if model=="ESFD8145W5"          
{txt}(24 real changes made)

{com}. *                                 "EVOT11061D31S"
. replace treath=1                if model=="EVOT11061D3S"        
{txt}(62 real changes made)

{com}. *                                 "EWF1287HDW2"
. replace treath=1                if model=="EWF1287HDW"          
{txt}(60 real changes made)

{com}. *                                 "EWSD61252WEU"
. replace treath=1                if model=="EWSD61252W"          
{txt}(25 real changes made)

{com}. *                                 "FH4A8FDN2"
. *                                 "FMD823MBEUR"
. replace treath=1                if model=="FMD823MBEUC"         
{txt}(24 real changes made)

{com}. *                                 "FMSG623BEU"
. replace treath=1                if model=="FMSG623B"            
{txt}(37 real changes made)

{com}. *                                 "GC41072D32S"
. replace treath=1                if model=="GC41072D3"           
{txt}(36 real changes made)

{com}. *                                 "GV138TWHC31S"
. replace treath=1                if model=="GV138TWHC3"          
{txt}(48 real changes made)

{com}. *                                 "GV4117DC32S"
. replace treath=1                if model=="GV4117DC32"          
{txt}(12 real changes made)

{com}. *                                 "GV4137TWHC31S"
. replace treath=1                if model=="GV4137TWHC3"         
{txt}(24 real changes made)

{com}. *                                 "ITWA51052WEU"
. replace treath=1                if model=="ITWA51052W"          
{txt}(50 real changes made)

{com}. *                                 "ITWD61252WEU"
. replace treath=1                if model=="ITWD61252W"          
{txt}(50 real changes made)

{com}. *                                 "IWSC61253CECOEU"
. *                                 "IWSC61253CECOEUM" 
. replace treath=1                if model=="IWSC61253CECO"       
{txt}(86 real changes made)

{com}. *                                 "IWSD60851CECOEU"
. replace treath=1                if model=="IWSD60851CECO"       
{txt}(73 real changes made)

{com}. *                                 "NA147VC6WGN"
. *                                 "NA168XR1WGN"
. *                                 "TDLR65231"
. replace treath=1                if model=="TDLR65231ZEN"        
{txt}(25 real changes made)

{com}. *                                 "W19409883670"
. *                                 "W5873WPS"Edition111""
. replace treath=1                if model=="W5873WPSEDITION111" 
{txt}(168 real changes made)

{com}. replace treath=1                if model=="W5873WPSLW"          
{txt}(48 real changes made)

{com}. *                                 "W668F09686480"
. *                                 "W695F09686520"
. *                                 "W7443LO"                                                     
. replace treath=1                if model=="W7443LA"             
{txt}(48 real changes made)

{com}. replace treath=1                if model=="W7443LB"             
{txt}(36 real changes made)

{com}. replace treath=1                if model=="W7443LR"             
{txt}(48 real changes made)

{com}. *                                 "WDA10010121130"
. replace treath=1                if model=="WDA100"                      
{txt}(24 real changes made)

{com}. *                                 "WDA10110246040"
. replace treath=1                if model=="WDA101WCS"           
{txt}(25 real changes made)

{com}. *                                 "WDA11009911260"
. replace treath=1                if model=="WDA110"                      
{txt}(60 real changes made)

{com}. replace treath=1                if model=="WDA110WCS"           
{txt}(110 real changes made)

{com}. *                                 "WDA11110246060"
. replace treath=1                if model=="WDA111"                      
{txt}(62 real changes made)

{com}. replace treath=1                if model=="WDA111WCS"           
{txt}(75 real changes made)

{com}. *                                 "WDA21009911270"
. replace treath=1                if model=="WDA210WPM"           
{txt}(109 real changes made)

{com}. *                                 "WDA21110246070"
. replace treath=1                if model=="WDA211WPM"           
{txt}(75 real changes made)

{com}. *                                 "WF60F4E0N2WLE"
. replace treath=1                if model=="WF60F4E0N2W"         
{txt}(96 real changes made)

{com}. *                                 "WF60F4EFW0WLE"
. replace treath=1                if model=="WF60F4EFW0W"         
{txt}(37 real changes made)

{com}. *                                 "WF60F4EFW2WLE"
. replace treath=1                if model=="WF60F4EFW2W"         
{txt}(37 real changes made)

{com}. *                                 "WKB13010004840"
. replace treath=1                if model=="WKB130WCS"           
{txt}(87 real changes made)

{com}. *                                 "WKF13009750750"
. replace treath=1                if model=="WKF130WPS"           
{txt}(84 real changes made)

{com}. *                                 "WKG13009750770"
. replace treath=1                if model=="WKG130WPS"           
{txt}(86 real changes made)

{com}. replace treath=1                if model=="WKG130TDOS"          
{txt}(111 real changes made)

{com}. *                                 "WKH13009750780"
. replace treath=1                if model=="WKH130WPS"           
{txt}(121 real changes made)

{com}. *                                 "WKR57009750800"
. replace treath=1                if model=="WKR570WPS"           
{txt}(36 real changes made)

{com}. *                                 "WMH26009826690"
. replace treath=1                if model=="WMH260WPS"           
{txt}(36 real changes made)

{com}. *                                 "WMSF622EU"
. replace treath=1                if model=="WMSF622"             
{txt}(37 real changes made)

{com}. *                                 "WMTG602HEU"
. replace treath=1                if model=="WMTG602H"            
{txt}(13 real changes made)

{com}. *                                 "WMV96010105710"
. replace treath=1                if model=="WMV960WPS"           
{txt}(62 real changes made)

{com}. *                                 "WMY91443LMB1"
. replace treath=1                if model=="WMY91443LMB"         
{txt}(12 real changes made)

{com}. *                                 "WTL55712A+"
. replace treath=1                if model=="WTL55712"            
{txt}(48 real changes made)

{com}. *                                 "WTL55712A+++"
. replace treath=1                if model=="WTL55712"            
{txt}(0 real changes made)

{com}. *                                 "WTL55812A+"
. replace treath=1                if model=="WTL55812"            
{txt}(48 real changes made)

{com}. *                                 "WTL55812A+++"
. replace treath=1                if model=="WTL55812"            
{txt}(0 real changes made)

{com}. *                                 "WTLS60911"
. *                                 "WW10H9600EWEO"
. replace treath=1                if model=="WW10H9600EWWW10H9600EWE0" 
{txt}(73 real changes made)

{com}. *                                 "WW80J6413EWLE"
. replace treath=1                if model=="WW80J6413EW"         
{txt}(50 real changes made)

{com}. *                                 "WW90H7410EWLE"
. replace treath=1                if model=="WW90H7410EW"         
{txt}(72 real changes made)

{com}. *                                 "XWE81283XWEUC"
. replace treath=1                if model=="XWE81283XWEU"        
{txt}(24 real changes made)

{com}. *                                 "XWSA51052WEU"
. replace treath=1                if model=="XWSA51052W"          
{txt}(37 real changes made)

{com}. 
. drop _merge
{txt}
{com}. replace treath=0                if   treath!=1 & category=="washing machine"
{txt}(1,324,122 real changes made)

{com}. 
. tab energy_label_eu     if treath==1

{txt}energy_label_eu {c |}      Freq.     Percent        Cum.
{hline 16}{c +}{hline 35}
              A {c |}{res}        217        1.22        1.22
{txt}             A+ {c |}{res}      2,809       15.83       17.06
{txt}            A++ {c |}{res}      3,937       22.19       39.25
{txt}           A+++ {c |}{res}     10,741       60.55       99.80
{txt}        UNKNOWN {c |}{res}         36        0.20      100.00
{txt}{hline 16}{c +}{hline 35}
          Total {c |}{res}     17,740      100.00
{txt}
{com}. tab category                    if treath!=.

       {txt}category {c |}      Freq.     Percent        Cum.
{hline 16}{c +}{hline 35}
washing machine {c |}{res}  1,341,862      100.00      100.00
{txt}{hline 16}{c +}{hline 35}
          Total {c |}{res}  1,341,862      100.00
{txt}
{com}. 
. replace treath=0                if (energy_label_eu=="A" & treath==1)
{txt}(217 real changes made)

{com}. 
. codebook id if treath==1 & year==2015 & country=="Hungary"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}390{col 51}{txt}Missing "": {res}0{txt}/{res}4,680

{txt}{col 15}Examples: {res}"56979042"
{col 25}"79250810"
{col 25}"85451106"
{col 25}"93217300"
{txt}
{com}. codebook id if treath==0 & year==2015 & country=="Hungary"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}687{col 51}{txt}Missing "": {res}0{txt}/{res}8,244

{txt}{col 15}Examples: {res}"59236434"
{col 25}"73882415"
{col 25}"79513827"
{col 25}"88157166"
{txt}
{com}. 
. 
. **********************************************************************************************
. ***HUNGARY************************************************************************************
. **Refrigerators and freezers, merge by model number from eligibility list
. **Subsidy program in 2016
. **********************************************************************************************
. 
. merge m:m model country using "R:\WSV2\TBu_BMa\Subsidies Project\Data Subsidies\Hungary\Treated models HU RFGFRZ 2016.dta"
{res}
{txt}{col 5}Result{col 33}Number of obs
{col 5}{hline 41}
{col 5}Not matched{col 30}{res}       4,161,261
{txt}{col 9}from master{col 30}{res}       4,161,030{txt}  (_merge==1)
{col 9}from using{col 30}{res}             231{txt}  (_merge==2)

{col 5}Matched{col 30}{res}          29,073{txt}  (_merge==3)
{col 5}{hline 41}

{com}. 
. ***MANUALLY CHECKING UNMACHED MODELS"
. 
. drop if _merge==2
{txt}(231 observations deleted)

{com}. 
. *                                 "B2850"
. replace treathf=1               if model=="IKB2850"             
{txt}(72 real changes made)

{com}. *                                 "BCB7030AAAFC"
. *                                 "BCB7030DAA"
. replace treathf=1               if model=="BCB7030DAAA"         
{txt}(0 real changes made)

{com}. *                                 "BCB80201AAFCO3"
. replace treathf=1               if model=="CB80201AAFC03"       
{txt}(0 real changes made)

{com}. *                                 "BCB8020AAFC"
. replace treathf=1               if model=="BCB80201AAFC03"      
{txt}(12 real changes made)

{com}. *                                 "BD2422HA"                                                    (Austria)
. *                                 "BF1801EFAA"
. *                                 "BFS12221"
. *                                 "BLF5001W"
. replace treathf=1               if model=="BLF5001"             
{txt}(25 real changes made)

{com}. *                                 "C29SMT1002"
. replace treathf=1               if model=="C29SMT100211"        
{txt}(25 real changes made)

{com}. *                                 "C31SMT1002"
. replace treathf=1               if model=="C31SMT10022"         
{txt}(12 real changes made)

{com}. *                                 "C3525"                                                               (Austria)
. *                                 "C3825"                                                               (Austria)
. *                                 "CB4315"                                                              (Austria)
. *                                 "CB4815"                                                              (Austria)
. *                                 "CBEF4315"                                                    (Austria)
. *                                 "CBN4815"                                                     (Austria, Croatia)
. *                                 "CBNBE6256"
. *                                 "CBNBS4815"                                                   (Austria)
. *                                 "CBNESF5133"
. replace treathf=1               if model=="CBNESF5133COMFORT" 
{txt}(72 real changes made)

{com}. *                                 "CBNP4858"
. *                                 "CBNP5156"
. *                                 "CBNPBE5156"
. *                                 "CBNPBS4858"                                                  (Austria)
. *                                 "CBNPES3967"                                                  (Austria)
. *                                 "CBNPES4858"                                                  (Croatia)
. *                                 "CBS3425"                                                     (Austria)
. *                                 "CCBS6184WH1"
. replace treathf=1               if model=="CCBS6184WH"          
{txt}(13 real changes made)

{com}. *                                 "CCOUS5144IW"
. replace treathf=1               if model=="CCOUS5144IWH"        
{txt}(50 real changes made)

{com}. *                                 "CEF3425"                                                     (Austria)
. *                                 "CEF3525"                                                     (Austria)
. *                                 "CKBC3350E1"
. replace treathf=1               if model=="CKBC3350E"           
{txt}(12 real changes made)

{com}. *                                 "CKDS5144WH"
. replace treathf=1               if model=="CKDS5144W"           
{txt}(62 real changes made)

{com}. *                                 "CMES502"                                                     (Austria)
. *                                 "CN3115"                                                              (Austria)
. *                                 "CN4315"                                                              (Austria)
. *                                 "CN5113"
. replace treathf=1               if model=="CN5113COMFORT"       
{txt}(60 real changes made)

{com}. *                                 "CNBS3915"                                                    (Austria)
. *                                 "CNBS4315"                                                    (Austria)
. *                                 "CNEF3115"                                                    (Austria)
. *                                 "CNEF3715"                                                    (Austria)
. *                                 "CNP4358"                                                     (Austria)
. *                                 "CNP4758"                                                     (Austria)
. *                                 "CNP4858"                                                     (Austria)
. *                                 "CNPBS3758"                                                   (Austria)
. *                                 "CNPES3758"                                                   (Austria)
. *                                 "CNPES4358"                                                   (Austria)
. *                                 "CNPES4758"                                                   (Austria)
. *                                 "CNPES5156"
. *                                 "CP4315"                                                              (Austria)
. *                                 "CPEF4315"                                                    (Austria)
. *                                 "CTNESF3663"
. replace treathf=1               if model=="CTNESF3663PREMIUM"
{txt}(48 real changes made)

{com}. *                                 "CUNESF3933"                                                  (Austria)
. *                                 "ECBN5066"                                                    (Austria)
. *                                 "EN3489MFX"
. *                                 "ENBLH19321FW"
. replace treathf=1               if model=="ENBLH19321FW03"      
{txt}(37 real changes made)

{com}. *                                 "ENBYH19323FWO3"
. replace treathf=1               if model=="ENBYH19323FW03"      
{txt}(49 real changes made)

{com}. *                                 "ENXTGH193221FWO3T"
. replace treathf=1               if model=="ENXTGH193221FWO3TK" 
{txt}(36 real changes made)

{com}. *replace treat1=1               if model=="FBI5850"
. *                                 "FR2751501AAA"
. replace treathf=1               if model=="FR2751501AA"         
{txt}(48 real changes made)

{com}. *                                 "GBB59PZJVB"
. *                                 "GBB59SWJVB"
. *                                 "GBB60PZKVS"
. *                                 "GBF59WBDZB"
. *                                 "GN1201V"
. replace treathf=1               if model=="GN1201"                      
{txt}(61 real changes made)

{com}. *                                 "GN163220DS"
. replace treathf=1               if model=="GN163220S"           
{txt}(74 real changes made)

{com}. *                                 "GN2801A++"
. replace treathf=1               if model=="GN2801"                      
{txt}(60 real changes made)

{com}. *                                 "GN312"
. replace treathf=1               if model=="GN312M"                      
{txt}(0 real changes made)

{com}. *                                 "GN466IX"
. *                                 "GNP2666"                                                     (Austria)
. *                                 "GNP2713"                                                     (Austria)
. *                                 "GNP2855"                                                     (Austria)
. *                                 "GNP3255"                                                     (Austria)
. *                                 "GNP3755"                                                     (Austria)
. *                                 "GNPES4355"                                                   (Austria)
. *                                 "GNPESF2313"
. *                                 "GSJ961NSBV"
. *                                 "GSL1213"
. *                                 "HRF800DGS8"
. *                                 "HRK176AAAS"
. replace treathf=1               if model=="HRK176AA"            
{txt}(0 real changes made)

{com}. replace treathf=1               if model=="HRK176AAS"           
{txt}(13 real changes made)

{com}. *                                 "ICP2914"                                                     (Austria)
. *                                 "ICU3314"
. *                                 "IG1014"                                                              (Austria)
. *                                 "IG1614"                                                              (Austria)
. *                                 "IGN2756"                                                     (Austria)
. *                                 "IK1954"                                                              (Austria)
. *                                 "IK2754"                                                              (Austria)
. *                                 "IKB1910"                                                     (Austria)
. *                                 "IKB2314"                                                     (Austria, Croatia)
. *                                 "IKB2354"                                                     (Austria)
. *                                 "IKB2750"                                                     (Austria)
. *                                 "IKB3514"                                                     (Austria, Croatia)
. *                                 "IKBP2350"                                                    (Austria)
. *                                 "IKBP2754"                                                    (Austria)
. *                                 "IKBP2954"                                                    (Austria)
. *                                 "IKP1654"                                                     (Austria)
. *                                 "IKP2350"                                                     (Austria)
. *                                 "IKP2354"                                                     (Austria)
. *                                 "IKS1610"                                                     (Austria, Croatia)
. *                                 "IKS2310"                                                     (Austria, Croatia)
. *                                 "K3710"                                                               (Austria)
. *                                 "KB3750"                                                              (Austria)
. *                                 "KB4310"                                                              (Austria)
. *                                 "KB4350"
. *                                 "KBES3750"                                                    (Austria)
. *                                 "KBES4260"
. replace treathf=1               if model=="KBES4260PREMIUMBIOFRESH" 
{txt}(276 real changes made)

{com}. *                                 "KBES4350"
. *                                 "KBPES4354"                                                   (Austria)
. *                                 "KBPGW4354"                                                   (Austria, Croatia)
. *                                 "KEF4310"                                                     (Austria)
. *                                 "KGN39LB35"                                                   (Croatia)
. *                                 "LI7FF2SB"
. *                                 "NRB53V2XE"
. replace treathf=1               if model=="NRB53V2"             
{txt}(36 real changes made)

{com}. *                                 "NRBN31AW2"
. replace treathf=1               if model=="NRBN31AW2NRBN31AW2E" 
{txt}(12 real changes made)

{com}. *                                 "NRBN31EW1"
. replace treathf=1               if model=="NRBN31EW1E"          
{txt}(38 real changes made)

{com}. *                                 "NRBN31EX1"
. replace treathf=1               if model=="NRBN31EX1NRBN31EX1E" 
{txt}(37 real changes made)

{com}. *                                 "NRK6192MC"
. *                                 "NRK6192MRD"
. replace treathf=1               if model=="NRK6192MRDMCHMRMCJCHJRJC" 
{txt}(73 real changes made)

{com}. *                                 "NRKI512ST" (Croatia)
. *                                 "NRKORA62W"
. replace treathf=1               if model=="NRKORA62W53510770" 
{txt}(109 real changes made)

{com}. *                                 "ORB152BL"
. replace treathf=1               if model=="ORB152BLCGRO"        
{txt}(25 real changes made)

{com}. *                                 "ORB152C"
. *                                 "ORB152COL"
. replace treathf=1               if model=="ORB152CO"            
{txt}(0 real changes made)

{com}. replace treathf=1               if model=="ORB152CL"            
{txt}(12 real changes made)

{com}. replace treathf=1               if model=="ORB152OL"            
{txt}(0 real changes made)

{com}. *                                 "ORB152GR"
. *                                 "ORB152GRL"
. *                                 "ORB152O"
. *                                 "ORB152X"
. *                                 "ORK192BK"
. *                                 "ORK192BKL"
. replace treathf=1               if model=="ORK192BKBKL"         
{txt}(38 real changes made)

{com}. *                                 "ORK192C"
. *                                 "ORK192CH"
. *                                 "ORK192CL"
. *                                 "ORK192CO"
. *                                 "ORK192COL"
. *                                 "ORK192R"
. *                                 "ORK192RL"
. replace treathf=1               if model=="ORK192CRBLGRCOOCHLCOLRD" 
{txt}(51 real changes made)

{com}. *                                 "OS1A100"                                                     (Austria)
. *                                 "OS1A200H"                                                    (Austria)
. *                                 "OS1A250H"
. *                                 "OS1A300H"                                                    (Austria)
. *                                 "R1301101AA" (an earlier product in Hungary, class A, not eligible)
. *                                 "RAA29NX"
. replace treathf=1               if model=="RAA29"                       
{txt}(49 real changes made)

{com}. *                                 "RAA29S"                                                              (Austria)
. *                                 "RB29FERNCSAEF"
. replace treathf=1               if model=="RB29FERNCSA"         
{txt}(98 real changes made)

{com}. *                                 "RB30J3000SAEF"
. replace treathf=1               if model=="RB30J3000SA"         
{txt}(38 real changes made)

{com}. *                                 "RB31FERNBSSEF"
. replace treathf=1               if model=="RB31FERNBSS"         
{txt}(73 real changes made)

{com}. replace treathf=1               if model=="RB31FERNBSA"         
{txt}(85 real changes made)

{com}. *                                 "RB31FERNCSAEF"
. replace treathf=1               if model=="RB31FERNCSA"         
{txt}(86 real changes made)

{com}. *                                 "RB31HER2BSAEF"
. *                                 "RB33J3205SAEF"
. replace treathf=1               if model=="RB33J3205SA"         
{txt}(49 real changes made)

{com}. *                                 "RB33J3205WWEF"
. replace treathf=1               if model=="RB33J3205WW"         
{txt}(13 real changes made)

{com}. *                                 "RB33J3230WWEF"
. replace treathf=1               if model=="RB33J3230WW"         
{txt}(25 real changes made)

{com}. *                                 "RB37J5005SAEF"
. replace treathf=1               if model=="RB37J5005SA"         
{txt}(37 real changes made)

{com}. *                                 "RB60299OP"
. *                                 "RCNA365E32DZX"                                               (Austria)
. *                                 "RCNA365E32X"
. *                                 "RCSA340K30W"                                                 (Austria)
. *                                 "RCSA365K20S"                                                 (Austria)
. *                                 "RCSA365K20X"
. *                                 "RCSA365K30W"                                                 (Austria)
. *                                 "RCSA400K31W"
. *                                 "RDSA240K30W"
. *                                 "RDSA310M30X"
. *                                 "RF31SMS1002"
. replace treathf=1               if model=="RF31SMS10021"        
{txt}(12 real changes made)

{com}. *                                 "RF31SMS1MA21"
. *                                 "RF32SMS1002" 
. replace treathf=1               if model=="RF32SMS10021"        
{txt}(12 real changes made)

{com}. *                                 "RF34NMP10026NOFROST"
. replace treathf=1               if model=="RF34NMP10026"        
{txt}(12 real changes made)

{com}. *                                 "RF34NMP1CB26NOFROST"
. *                                 "RF34SMP10027"
. replace treathf=1               if model=="RF34SMP100273"       
{txt}(12 real changes made)

{com}. replace treathf=1               if model=="RF34SMP10027A++" 
{txt}(12 real changes made)

{com}. *                                 "RF36SMS1002"
. replace treathf=1               if model=="RF36SMS10021"        
{txt}(13 real changes made)

{com}. *                                 "RF36VEP1JJ27"
. *                                 "RF39SMS1002"
. *                                 "RF60309OBK"
. *                                 "RF60309OBKL" 
. replace treathf=1               if model=="RF60309OBKOBKL"      
{txt}(157 real changes made)

{com}. *                                 "RF60309OC"
. *                                 "RF60309OCL"                                                  (Croatia)
. replace treathf=1               if model=="RF60309OCOCL"        
{txt}(108 real changes made)

{com}. *                                 "RF60309OCHL"
. replace treathf=1               if model=="RF60309OCH"          
{txt}(0 real changes made)

{com}. replace treathf=1               if model=="RF60309OCHOCHL"      
{txt}(121 real changes made)

{com}. *                                 "RF60309OCO"
. *                                 "RF60309OCOL"
. replace treathf=1               if model=="RF60309OCOOCOL"      
{txt}(170 real changes made)

{com}. *                                 "RF60309OR" 
. *                                 "RF60309ORL"
. replace treathf=1               if model=="RF60309OCORCHOGOB" 
{txt}(229 real changes made)

{com}. *                                 "RFI4151AW"                                                   (Austria, Croatia)
. *                                 "RH56J69187FEF"
. replace treathf=1               if model=="RH56J69187F"         
{txt}(50 real changes made)

{com}. *                                 "RK60359OC"                                                   (Austria)
. replace treathf=1               if model=="RK60359OCOROBKOCOOCHL" 
{txt}(240 real changes made)

{com}. *                                 "RK6191EX"                                                    (Austria, Croatia)
. *                                 "RR35H6610SSEO"
. replace treathf=1               if model=="RR35H6610SS"         
{txt}(37 real changes made)

{com}. *                                 "RS7557BHCSPEF"
. replace treathf=1               if model=="RS7557BHCSP"         
{txt}(50 real changes made)

{com}. *                                 "RS7778FHCSREF"
. replace treathf=1               if model=="RS7778FHCSR"         
{txt}(145 real changes made)

{com}. *                                 "RV540PRU3GBK"
. *                                 "RV610PRU3INX"
. replace treathf=1               if model=="RV610PRU3XINX"       
{txt}(12 real changes made)

{com}. *                                 "RZ28H6150SSEO"
. replace treathf=1               if model=="RZ28H6150SS"         
{txt}(37 real changes made)

{com}. *                                 "S12A1DHA"
. *                                 "S53630CSX2"
. *                                 "S53930CNX2"                                                  (Austria)
. *                                 "S66090XNS1"
. *                                 "S72300DSW1"
. *                                 "S74010KDW0"
. *                                 "S74010KDX0"
. *                                 "S83930CTX2"
. *                                 "SB1801AA"
. *                                 "SBS61I4"                                                     (Austria)
. *                                 "SBS66I2"
. *                                 "SBS66I3"
. *                                 "SBS7212"
. *                                 "SBS7242"
. *                                 "SBSES7252"
. *                                 "SBSES7253"
. replace treathf=1               if model=="SBSES7253SGNES3010+SKBES4210" 
{txt}(120 real changes made)

{com}. *                                 "SBSES7263"                                                   (Austria)
. *                                 "SBSESF7242"
. *                                 "SCS71800CO"
. replace treathf=1               if model=="SCS71800C0"          
{txt}(25 real changes made)

{com}. *                                 "SCS81800CO"
. replace treathf=1               if model=="SCS81800C0"          
{txt}(73 real changes made)

{com}. *                                 "SDSO1722VJ"                                                  (Austria)
. *                                 "SJBA10IEXI2EU"
. replace treathf=1               if model=="SJBA10IEXI2"         
{txt}(13 real changes made)

{com}. *                                 "SJBA10IEXW2EU"
. replace treathf=1               if model=="SJBA10IEXW2"         
{txt}(13 real changes made)

{com}. *                                 "SJEX820FBE"
. replace treathf=1               if model=="SJEX820FBESJEX820FBE" 
{txt}(13 real changes made)

{com}. *                                 "SJL2350E0IEU"
. replace treathf=1               if model=="SJL2350E0I"          
{txt}(13 real changes made)

{com}. *                                 "SJL2350E0WEU"
. replace treathf=1               if model=="SJL2350E0W"          
{txt}(13 real changes made)

{com}. *                                 "SJS2251E0IEU"
. replace treathf=1               if model=="SJS2251E0I"          
{txt}(13 real changes made)

{com}. *                                 "SJS2252E0IWEU"
. *                                 "SJT1253MOSEU"
. replace treathf=1               if model=="SJT1253MOS"          
{txt}(25 real changes made)

{com}. *                                 "SZ12A1DHA"
. *                                 "TSN1451"
. *                                 "UIK1414"
. *                                 "UPSO1722FJ"                                                  (Austria)
. *                                 "WVE1751 NFW"
. replace treathf=1               if model=="WVE1751NFW"          
{txt}(37 real changes made)

{com}. *                                 "XH8T2IWZH"
. replace treathf=1               if model=="XH8T2IW"             
{txt}(13 real changes made)

{com}. *                                 "XH8T2OCH"                                                    (Croatia)
. *                                 "XH8T2OXZH"                                                   (Croatia)
. *                                 "XH8T2ZWOZH"
. *                                 "XH8T2ZXOZH"
. *                                 "XH8T3ZXOJZV"
. 
. 
. 
. drop _merge
{txt}
{com}. 
. 
. replace treathf=0 if treathf!=1  & (category=="refrigerator"|category=="freezer")
{txt}(2,815,267 real changes made)

{com}. 
. tab energy_label_eu     if treathf==1

{txt}energy_label_eu {c |}      Freq.     Percent        Cum.
{hline 16}{c +}{hline 35}
              A {c |}{res}        548        1.66        1.66
{txt}             A+ {c |}{res}     15,924       48.29       49.95
{txt}            A++ {c |}{res}     13,715       41.59       91.55
{txt}           A+++ {c |}{res}      2,787        8.45      100.00
{txt}{hline 16}{c +}{hline 35}
          Total {c |}{res}     32,974      100.00
{txt}
{com}. tab category                    if treathf!=.

       {txt}category {c |}      Freq.     Percent        Cum.
{hline 16}{c +}{hline 35}
        freezer {c |}{res}    487,184       17.10       17.10
{txt}   refrigerator {c |}{res}  2,361,057       82.90      100.00
{txt}{hline 16}{c +}{hline 35}
          Total {c |}{res}  2,848,241      100.00
{txt}
{com}. 
. replace treathf=0               if (energy_label_eu=="A" & treathf==1)
{txt}(548 real changes made)

{com}. 
. codebook id if treathf==1 & year==2016 & country=="Hungary"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}913{col 51}{txt}Missing "": {res}0{txt}/{res}10,956

{txt}{col 15}Examples: {res}"110205485"
{col 25}"62688279"
{col 25}"79719912"
{col 25}"90112923"
{txt}
{com}. codebook id if treathf==0 & year==2016 & country=="Hungary"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}992{col 51}{txt}Missing "": {res}12{txt}/{res}11,916

{txt}{col 15}Examples: {res}"115569320"
{col 25}"64921784"
{col 25}"79581587"
{col 25}"90655062"
{txt}
{com}.  
. 
. 
. 
.  *****************************
.  **********SUMMARY ***********
.  *****************************
.  
. label variable treath   "Identifier for subsidized WM based on HU eligibility list in 2015"
{txt}
{com}. label variable treathf  "Identifier for subsidized REF/FRZ based on HU eligibility list in 2016"
{txt}
{com}. label variable treata   "Identifier for subsidized WM based on AT eligibility list in 2010"
{txt}
{com}. label variable treataf  "Identifier for subsidized REF/FRZ based on energy label of A++ (AT subsidy requirement)"
{txt}note: label truncated to 80 characters

{com}. label variable treatc   "Identifier for subsidized WM/REF/FRZ based on energy label of A+++ (HR subsidy requirement)"
{txt}note: label truncated to 80 characters

{com}. 
. 
.  *********************************************
.  ***** NUMBER OF PRODUCTS IN SUBSIDY YEAR*****
.  *********************************************
.  codebook id if country=="Austria" & year==2009 & (category=="freezer"|category=="refrigerator")

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}3,337{col 51}{txt}Missing "": {res}24{txt}/{res}40,068

{txt}{col 15}Examples: {res}"27281054"
{col 25}"33097553"
{col 25}"38238393"
{col 25}"50665651"
{txt}
{com}.  codebook id if country=="Austria" & year==2010 & (category=="freezer"|category=="refrigerator")

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}3,165{col 51}{txt}Missing "": {res}24{txt}/{res}38,004

{txt}{col 15}Examples: {res}"28961901"
{col 25}"36064120"
{col 25}"49039280"
{col 25}"54046255"
{txt}
{com}.  codebook id if country=="Austria" & year==2010 & (category=="washing machine")

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}1,151{col 51}{txt}Missing "": {res}12{txt}/{res}13,824

{txt}{col 15}Examples: {res}"33964170"
{col 25}"43360041"
{col 25}"51763158"
{col 25}"55887024"
{txt}
{com}. 
.  codebook id if country=="Hungary" & year==2015 & (category=="washing machine")

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}1,077{col 51}{txt}Missing "": {res}0{txt}/{res}12,924

{txt}{col 15}Examples: {res}"59236434"
{col 25}"75057659"
{col 25}"81468512"
{col 25}"91743241"
{txt}
{com}.  codebook id if country=="Hungary" & year==2016 & (category=="freezer"|category=="refrigerator")

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}1,905{col 51}{txt}Missing "": {res}12{txt}/{res}22,872

{txt}{col 15}Examples: {res}"111731231"
{col 25}"64464143"
{col 25}"79706267"
{col 25}"90327837"
{txt}
{com}. 
.  
.  codebook id if country=="Croatia" & year==2015 & (category=="washing machine")

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}774{col 51}{txt}Missing "": {res}12{txt}/{res}9,300

{txt}{col 15}Examples: {res}"57300796"
{col 25}"74683827"
{col 25}"81468523"
{col 25}"90904464"
{txt}
{com}.  codebook id if country=="Croatia" & year==2015 & (category=="freezer"|category=="refrigerator")

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}1,082{col 51}{txt}Missing "": {res}12{txt}/{res}12,996

{txt}{col 15}Examples: {res}"55845691"
{col 25}"72165351"
{col 25}"79559477"
{col 25}"88828309"
{txt}
{com}.  
.  
.  ***Number of subsidized in subsidy year
.  codebook id if country=="Austria" & year==2009 & (category=="freezer"|category=="refrigerator") & treataf==1

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}408{col 51}{txt}Missing "": {res}0{txt}/{res}4,896

{txt}{col 15}Examples: {res}"35054816"
{col 25}"39458681"
{col 25}"49845994"
{col 25}"53328369"
{txt}
{com}.  codebook id if country=="Austria" & year==2010 & (category=="freezer"|category=="refrigerator") & treataf==1

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}565{col 51}{txt}Missing "": {res}0{txt}/{res}6,780

{txt}{col 15}Examples: {res}"37375373"
{col 25}"49517072"
{col 25}"53329022"
{col 25}"55885050"
{txt}
{com}.  codebook id if country=="Austria" & year==2010 & (category=="washing machine")                                  & treata==1

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str8

{col 10}Unique values: {res}134{col 51}{txt}Missing "": {res}0{txt}/{res}1,608

{txt}{col 15}Examples: {res}"50311947"
{col 25}"53162833"
{col 25}"53445543"
{col 25}"55710657"
{txt}
{com}. 
.  codebook id if country=="Hungary" & year==2015 & (category=="washing machine")                                  & treath==1

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}390{col 51}{txt}Missing "": {res}0{txt}/{res}4,680

{txt}{col 15}Examples: {res}"56979042"
{col 25}"79250810"
{col 25}"85451106"
{col 25}"93217300"
{txt}
{com}.  codebook id if country=="Hungary" & year==2016 & (category=="freezer"|category=="refrigerator") & treathf==1

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}913{col 51}{txt}Missing "": {res}0{txt}/{res}10,956

{txt}{col 15}Examples: {res}"110205485"
{col 25}"62688279"
{col 25}"79719912"
{col 25}"90112923"
{txt}
{com}. 
.  
.  codebook id if country=="Croatia" & year==2015 & (category=="washing machine") & treatc==1

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}310{col 51}{txt}Missing "": {res}0{txt}/{res}3,720

{txt}{col 15}Examples: {res}"66090643"
{col 25}"80066378"
{col 25}"85691435"
{col 25}"93210116"
{txt}
{com}.  codebook id if country=="Croatia" & year==2015 & (category=="freezer"|category=="refrigerator") & treatc==1

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}33{col 51}{txt}Missing "": {res}0{txt}/{res}396

{txt}{col 15}Examples: {res}"62684239"
{col 25}"77441410"
{col 25}"82802291"
{col 25}"91161650"
{txt}
{com}.  
.  
.  
.  *********************************************
.  ***** DROP MODELS SOLD IN ONLY ONE COUNTRY***
.  *********************************************
. 
. by id country, sort: gen n=_n
{txt}
{com}. replace n=0 if n>1
{txt}(4,080,189 real changes made)

{com}. by id, sort: egen sumn=sum(n)
{txt}
{com}. 
. tab sumn 

       {txt}sumn {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}  1,200,061       28.64       28.64
{txt}          2 {c |}{res}  1,118,508       26.69       55.33
{txt}          3 {c |}{res}    586,454       14.00       69.33
{txt}          4 {c |}{res}    404,745        9.66       78.99
{txt}          5 {c |}{res}    377,206        9.00       87.99
{txt}          6 {c |}{res}    267,249        6.38       94.37
{txt}          7 {c |}{res}    143,518        3.43       97.80
{txt}          8 {c |}{res}     92,362        2.20      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}  4,190,103      100.00
{txt}
{com}. 
. drop if sumn==1
{txt}(1,200,061 observations deleted)

{com}. drop n sumn
{txt}
{com}. 
.  ************************************************************************
.  ***** DROP MODELS SOLD IN ONLY ONE COUNTRY WITHIN A PRODUCT-DATE CELL***
.  ************************************************************************
. 
. by id country date, sort: gen n=_n
{txt}
{com}. replace n=0 if n>1
{txt}(1,090 real changes made)

{com}. by id date, sort: egen sumn=sum(n)
{txt}
{com}. 
. tab sumn 

       {txt}sumn {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}    474,672       15.88       15.88
{txt}          2 {c |}{res}  1,125,710       37.65       53.52
{txt}          3 {c |}{res}    535,344       17.90       71.43
{txt}          4 {c |}{res}    350,928       11.74       83.16
{txt}          5 {c |}{res}    264,097        8.83       92.00
{txt}          6 {c |}{res}    147,006        4.92       96.91
{txt}          7 {c |}{res}     68,301        2.28       99.20
{txt}          8 {c |}{res}     23,984        0.80      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}  2,990,042      100.00
{txt}
{com}. 
. ***Market share of subsidized sold in at least two countries 3 months prior to subsidization
. 
. egen sumunits   =sum(units)     if year==2009 & country=="Austria" & (category=="freezer"|category=="refrigerator") & month==6
{txt}(2,987,314 missing values generated)

{com}. egen sumunits_s =sum(units)     if year==2009 & country=="Austria" & (category=="freezer"|category=="refrigerator") & month==6 & treataf==1 & sumn>1
{txt}(2,989,661 missing values generated)

{com}. gen ms_a9=sumunits_s/sumunits
{txt}(2,989,661 missing values generated)

{com}. sum sumunits sumunits_s

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}sumunits {c |}{res}      2,728    23623.96           0   23623.96   23623.96
{txt}{space 2}sumunits_s {c |}{res}        381     2886.47           0    2886.47    2886.47
{txt}
{com}. drop sumunits sumunits_s
{txt}
{com}. sum ms_a9

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}ms_a9 {c |}{res}        381     .122184           0    .122184    .122184
{txt}
{com}. 
. egen sumunits   =sum(units)     if year==2010 & country=="Austria" & (category=="freezer"|category=="refrigerator") & month==6
{txt}(2,987,347 missing values generated)

{com}. egen sumunits_s =sum(units)     if year==2010 & country=="Austria" & (category=="freezer"|category=="refrigerator") & month==6 & treataf==1 & sumn>1
{txt}(2,989,517 missing values generated)

{com}. gen ms_a10=sumunits_s/sumunits
{txt}(2,989,517 missing values generated)

{com}. sum sumunits sumunits_s

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}sumunits {c |}{res}      2,695    24420.94           0   24420.94   24420.94
{txt}{space 2}sumunits_s {c |}{res}        525    4554.763           0   4554.763   4554.763
{txt}
{com}. drop sumunits sumunits_s
{txt}
{com}. sum ms_a10

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 6}ms_a10 {c |}{res}        525    .1865106           0   .1865106   .1865106
{txt}
{com}. 
. egen sumunits   =sum(units)     if year==2010 & country=="Austria" & (category=="washing machine") & month==1
{txt}(2,989,066 missing values generated)

{com}. egen sumunits_s =sum(units)     if year==2010 & country=="Austria" & (category=="washing machine") & month==1 & treata==1 & sumn>1
{txt}(2,989,923 missing values generated)

{com}. gen ms_a10w=sumunits_s/sumunits
{txt}(2,989,923 missing values generated)

{com}. sum sumunits sumunits_s

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}sumunits {c |}{res}        976    21267.48           0   21267.48   21267.48
{txt}{space 2}sumunits_s {c |}{res}        119    2287.558           0   2287.558   2287.558
{txt}
{com}. drop sumunits sumunits_s
{txt}
{com}. sum ms_a10w

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 5}ms_a10w {c |}{res}        119    .1075613           0   .1075613   .1075613
{txt}
{com}. 
. egen sumunits   =sum(units)     if year==2015 & country=="Hungary" & (category=="freezer"|category=="refrigerator") & month==7
{txt}(2,988,500 missing values generated)

{com}. egen sumunits_s =sum(units)     if year==2015 & country=="Hungary" & (category=="freezer"|category=="refrigerator") & month==7 & treathf==1 & sumn>1
{txt}(2,989,485 missing values generated)

{com}. gen ms_hf=sumunits_s/sumunits
{txt}(2,989,485 missing values generated)

{com}. sum sumunits sumunits_s

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}sumunits {c |}{res}      1,542    35716.79           0   35716.79   35716.79
{txt}{space 2}sumunits_s {c |}{res}        557     28917.1           0    28917.1    28917.1
{txt}
{com}. drop sumunits sumunits_s
{txt}
{com}. sum ms_hf

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}ms_hf {c |}{res}        557    .8096222           0   .8096222   .8096222
{txt}
{com}. 
. egen sumunits   =sum(units)     if year==2016 & country=="Hungary" & (category=="washing machine") & month==6
{txt}(2,989,191 missing values generated)

{com}. egen sumunits_s =sum(units)     if year==2016 & country=="Hungary" & (category=="washing machine") & month==6 & treath==1 & sumn>1
{txt}(2,989,699 missing values generated)

{com}. gen ms_h=sumunits_s/sumunits
{txt}(2,989,699 missing values generated)

{com}. sum sumunits sumunits_s

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}sumunits {c |}{res}        851     19547.2           0    19547.2    19547.2
{txt}{space 2}sumunits_s {c |}{res}        343     16225.9           0    16225.9    16225.9
{txt}
{com}. drop sumunits sumunits_s
{txt}
{com}. sum ms_h

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 8}ms_h {c |}{res}        343    .8300883           0   .8300883   .8300883
{txt}
{com}. 
. egen sumunits   =sum(units)     if year==2015 & country=="Croatia" & (category=="washing machine") & month==3
{txt}(2,989,394 missing values generated)

{com}. egen sumunits_s =sum(units)     if year==2015 & country=="Croatia" & (category=="washing machine") & month==3 & treatc==1 & sumn>1
{txt}(2,989,774 missing values generated)

{com}. gen ms_cw=sumunits_s/sumunits
{txt}(2,989,774 missing values generated)

{com}. sum sumunits sumunits_s

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 4}sumunits {c |}{res}        648    5089.553           0   5089.553   5089.553
{txt}{space 2}sumunits_s {c |}{res}        268    1921.883           0   1921.883   1921.883
{txt}
{com}. drop sumunits sumunits_s
{txt}
{com}. sum ms_cw

{txt}    Variable {c |}        Obs        Mean    Std. dev.       Min        Max
{hline 13}{c +}{hline 57}
{space 7}ms_cw {c |}{res}        268    .3776133           0   .3776133   .3776133
{txt}
{com}. 
. 
. drop if sumn==1
{txt}(474,672 observations deleted)

{com}. 
.  ****************************************************************************************
.  ***** SUMMARY TREATED AND NON-TREATED MODELS IN COUNTRY OF SUBSIDY IN YEAR OF SUBSIDY***
.  ****************************************************************************************
. **HR, WM+FF, 2015
. codebook id                     if treatc== 1 & year==2015 & country=="Croatia"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}301{col 51}{txt}Missing "": {res}0{txt}/{res}3,612

{txt}{col 15}Examples: {res}"70566391"
{col 25}"80075560"
{col 25}"88980399"
{col 25}"93210116"
{txt}
{com}. codebook id                     if treatc== 0 & year==2015 & country=="Croatia"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}1,094{col 51}{txt}Missing "": {res}24{txt}/{res}13,152

{txt}{col 15}Examples: {res}"59215150"
{col 25}"73661644"
{col 25}"79655081"
{col 25}"88157166"
{txt}
{com}. 
. **AT, WM, 2010
. codebook id                     if treata==1 & year==2010 & country=="Austria"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str8

{col 10}Unique values: {res}119{col 51}{txt}Missing "": {res}0{txt}/{res}1,428

{txt}{col 15}Examples: {res}"49375941"
{col 25}"52745515"
{col 25}"53400139"
{col 25}"54751307"
{txt}
{com}. codebook id                     if treata==0 & year==2010 & country=="Austria"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}742{col 51}{txt}Missing "": {res}12{txt}/{res}8,916

{txt}{col 15}Examples: {res}"34309313"
{col 25}"42521461"
{col 25}"50539009"
{col 25}"54849531"
{txt}
{com}. codebook id                     if treata==1 & year==2010 & country=="Austria" & energy_label_eu=="A+++"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str8

{col 10}Unique values: {res}57{col 51}{txt}Missing "": {res}0{txt}/{res}684

{txt}{col 15}Examples: {res}"47113780"
{col 25}"52745363"
{col 25}"53325670"
{col 25}"54480608"
{txt}
{com}. codebook id                     if treata==1 & year==2010 & country=="Austria" & energy_label_eu=="A++"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str8

{col 10}Unique values: {res}26{col 51}{txt}Missing "": {res}0{txt}/{res}312

{txt}{col 15}Examples: {res}"50361844"
{col 25}"53195223"
{col 25}"53448725"
{col 25}"53992187"
{txt}
{com}. codebook id                     if treata==1 & year==2010 & country=="Austria" & energy_label_eu=="A+"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str8

{col 10}Unique values: {res}2{col 51}{txt}Missing "": {res}0{txt}/{res}24

{txt}{col 13}Tabulation: Freq.  Value
{col 20}{res}        12{col 32}"48498252"
{col 20}        12{col 32}"50311947"
{txt}
{com}. codebook id                     if treata==1 & year==2010 & country=="Austria" & energy_label_eu=="A"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str8

{col 10}Unique values: {res}34{col 51}{txt}Missing "": {res}0{txt}/{res}408

{txt}{col 15}Examples: {res}"50311994"
{col 25}"52003672"
{col 25}"53444992"
{col 25}"55467350"
{txt}
{com}. 
.  
. **AT, FF, 2009
. codebook id                     if treataf==1 & year==2009 & country=="Austria"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}381{col 51}{txt}Missing "": {res}0{txt}/{res}4,572

{txt}{col 15}Examples: {res}"35201440"
{col 25}"39441895"
{col 25}"49654009"
{col 25}"52430177"
{txt}
{com}. codebook id                     if treataf==0 & year==2009 & country=="Austria"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}2,167{col 51}{txt}Missing "": {res}24{txt}/{res}26,028

{txt}{col 15}Examples: {res}"28818679"
{col 25}"33146576"
{col 25}"37932320"
{col 25}"50370232"
{txt}
{com}. 
. **AT, FF, 2010
. codebook id                     if treataf==1 & year==2010 & country=="Austria"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}525{col 51}{txt}Missing "": {res}0{txt}/{res}6,300

{txt}{col 15}Examples: {res}"37346989"
{col 25}"49441715"
{col 25}"52514100"
{col 25}"55782192"
{txt}
{com}. codebook id                     if treataf==0 & year==2010 & country=="Austria"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}1,925{col 51}{txt}Missing "": {res}24{txt}/{res}23,124

{txt}{col 15}Examples: {res}"29204409"
{col 25}"35569984"
{col 25}"43469429"
{col 25}"52430453"
{txt}
{com}.  
.  
.  **HU, WM, 2015
. codebook id if treath==1 & year==2015 & country=="Hungary"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}338{col 51}{txt}Missing "": {res}0{txt}/{res}4,056

{txt}{col 15}Examples: {res}"68630471"
{col 25}"79278604"
{col 25}"87670709"
{col 25}"93335312"
{txt}
{com}. codebook id if treath==0 & year==2015 & country=="Hungary"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}499{col 51}{txt}Missing "": {res}0{txt}/{res}5,988

{txt}{col 15}Examples: {res}"65829314"
{col 25}"75256013"
{col 25}"80919975"
{col 25}"89502736"
{txt}
{com}. codebook id if treath==1 & year==2015 & country=="Hungary" & energy_label_eu=="A+++"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}225{col 51}{txt}Missing "": {res}0{txt}/{res}2,700

{txt}{col 15}Examples: {res}"70854476"
{col 25}"79250829"
{col 25}"88973610"
{col 25}"94446477"
{txt}
{com}. codebook id if treath==1 & year==2015 & country=="Hungary" & energy_label_eu=="A++"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}75{col 51}{txt}Missing "": {res}0{txt}/{res}900

{txt}{col 15}Examples: {res}"70103840"
{col 25}"79752042"
{col 25}"89827614"
{col 25}"92773531"
{txt}
{com}. codebook id if treath==1 & year==2015 & country=="Hungary" & energy_label_eu=="A+"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}37{col 51}{txt}Missing "": {res}0{txt}/{res}444

{txt}{col 15}Examples: {res}"51262770"
{col 25}"77517812"
{col 25}"81817931"
{col 25}"88864244"
{txt}
{com}.  
. **HU,FF, 2016
. codebook id if treathf==1 & year==2016 & country=="Hungary" 

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}811{col 51}{txt}Missing "": {res}0{txt}/{res}9,732

{txt}{col 15}Examples: {res}"110217269"
{col 25}"64462942"
{col 25}"79963140"
{col 25}"90217869"
{txt}
{com}. codebook id if treathf==0 & year==2016 & country=="Hungary" 

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt})

{col 10}Unique values: {res}674{col 51}{txt}Missing "": {res}12{txt}/{res}8,100

{txt}{col 15}Examples: {res}"37270964"
{col 25}"72284010"
{col 25}"80906932"
{col 25}"90854711"
{txt}
{com}. codebook id if treathf==1 & year==2016 & country=="Hungary" & energy_label_eu=="A+++"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}93{col 51}{txt}Missing "": {res}0{txt}/{res}1,116

{txt}{col 15}Examples: {res}"109073402"
{col 25}"112730942"
{col 25}"79716767"
{col 25}"90253090"
{txt}
{com}. codebook id if treathf==1 & year==2016 & country=="Hungary" & energy_label_eu=="A++"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}367{col 51}{txt}Missing "": {res}0{txt}/{res}4,404

{txt}{col 15}Examples: {res}"109897494"
{col 25}"63904608"
{col 25}"79981569"
{col 25}"90839259"
{txt}
{com}. codebook id if treathf==1 & year==2016 & country=="Hungary" & energy_label_eu=="A+"

{txt}{hline}
{res}id{right:(unlabeled)}
{txt}{hline}

{col 19}Type: String ({res}str11{txt}), but longest is str9

{col 10}Unique values: {res}351{col 51}{txt}Missing "": {res}0{txt}/{res}4,212

{txt}{col 15}Examples: {res}"112042569"
{col 25}"66398178"
{col 25}"78660129"
{col 25}"88247022"
{txt}
{com}. 
. 
. 
. *******************************************************************************************************************
. *****GENERATE COUNTRY-DATE SPECIFIC TIME DUMMIES FOR PROGRAM PERIOD AND SEVERAL MONTHS AROUND THE PROGRAM PERIOD***
. **This part of the do file generates the variable I_cd in the estimation equation
. *******************************************************************************************************************
. 
. *HR, WM+FF: June 2015; October 2015
. 
. gen sub1c=0
{txt}
{com}. 
. gen presub1c=0
{txt}
{com}. gen presub2c=0
{txt}
{com}. gen presub3c=0
{txt}
{com}. gen presub4c=0
{txt}
{com}. gen presub5c=0
{txt}
{com}. gen presub6c=0
{txt}
{com}. gen presub7c=0
{txt}
{com}. gen presub8c=0
{txt}
{com}. gen presub9c=0
{txt}
{com}. gen presub10c=0
{txt}
{com}. gen presub11c=0
{txt}
{com}. gen presub12c=0
{txt}
{com}. gen presub13c=0
{txt}
{com}. 
. 
. gen postsub1c=0
{txt}
{com}. gen postsub2c=0
{txt}
{com}. gen postsub3c=0
{txt}
{com}. gen postsub4c=0
{txt}
{com}. gen postsub5c=0
{txt}
{com}. gen postsub6c=0
{txt}
{com}. gen postsub7c=0
{txt}
{com}. gen postsub8c=0
{txt}
{com}. gen postsub9c=0
{txt}
{com}. gen postsub10c=0
{txt}
{com}. 
. replace presub13c=1     if country=="Croatia" & year==2014 & month==5   
{txt}(1,516 real changes made)

{com}. replace presub12c=1     if country=="Croatia" & year==2014 & month==6   
{txt}(1,516 real changes made)

{com}. replace presub11c=1     if country=="Croatia" & year==2014 & month==7
{txt}(1,516 real changes made)

{com}. replace presub10c=1     if country=="Croatia" & year==2014 & month==8   
{txt}(1,516 real changes made)

{com}. replace presub9c=1              if country=="Croatia" & year==2014 & month==9   
{txt}(1,516 real changes made)

{com}. replace presub8c=1              if country=="Croatia" & year==2014 & month==10  
{txt}(1,516 real changes made)

{com}. replace presub7c=1              if country=="Croatia" & year==2014 & month==11
{txt}(1,516 real changes made)

{com}. replace presub6c=1              if country=="Croatia" & year==2014 & month==12  
{txt}(1,516 real changes made)

{com}. replace presub5c=1              if country=="Croatia" & year==2015 & month==1
{txt}(1,397 real changes made)

{com}. replace presub4c=1              if country=="Croatia" & year==2015 & month==2   
{txt}(1,397 real changes made)

{com}. replace presub3c=1              if country=="Croatia" & year==2015 & month==3   
{txt}(1,397 real changes made)

{com}. replace presub2c=1              if country=="Croatia" & year==2015 & month==4   
{txt}(1,397 real changes made)

{com}. replace presub1c=1              if country=="Croatia" & year==2015 & month==5   
{txt}(1,397 real changes made)

{com}. 
. 
. replace sub1c=1                 if country=="Croatia" & year==2015 & month==6   
{txt}(1,397 real changes made)

{com}. 
. replace postsub1c=1     if country=="Croatia" & year==2015 & month==7   
{txt}(1,397 real changes made)

{com}. replace postsub2c=1     if country=="Croatia" & year==2015 & month==8   
{txt}(1,397 real changes made)

{com}. replace postsub3c=1     if country=="Croatia" & year==2015 & month==9   
{txt}(1,397 real changes made)

{com}. replace postsub4c=1     if country=="Croatia" & year==2015 & month==10  
{txt}(1,397 real changes made)

{com}. replace postsub5c=1     if country=="Croatia" & year==2015 & month==11  
{txt}(1,397 real changes made)

{com}. replace postsub6c=1     if country=="Croatia" & year==2015 & month==12  
{txt}(1,397 real changes made)

{com}. replace postsub7c=1     if country=="Croatia" & year==2016 & month==1   
{txt}(1,387 real changes made)

{com}. replace postsub8c=1     if country=="Croatia" & year==2016 & month==2   
{txt}(1,387 real changes made)

{com}. replace postsub9c=1     if country=="Croatia" & year==2016 & month==3   
{txt}(1,387 real changes made)

{com}. replace postsub10c=1    if country=="Croatia" & year==2016 & month==4   
{txt}(1,387 real changes made)

{com}. 
. 
. *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
. 
. **AT, WM, 2010: April-May 2010-Program Duration
.  
. gen sub1a=0
{txt}
{com}. gen sub2a=0
{txt}
{com}. 
. gen presub1a=0
{txt}
{com}. gen presub2a=0
{txt}
{com}. gen presub3a=0
{txt}
{com}. gen presub4a=0
{txt}
{com}. gen presub5a=0
{txt}
{com}. gen presub6a=0
{txt}
{com}. gen presub7a=0
{txt}
{com}. gen presub8a=0
{txt}
{com}. gen presub9a=0
{txt}
{com}. gen presub10a=0
{txt}
{com}. gen presub11a=0
{txt}
{com}. gen presub12a=0
{txt}
{com}. gen presub13a=0
{txt}
{com}. 
. 
. gen postsub1a=0
{txt}
{com}. gen postsub2a=0
{txt}
{com}. gen postsub3a=0
{txt}
{com}. gen postsub4a=0
{txt}
{com}. gen postsub5a=0
{txt}
{com}. gen postsub6a=0
{txt}
{com}. 
. replace presub13a=1     if country=="Austria" & year==2009 & month==3
{txt}(3,472 real changes made)

{com}. replace presub12a=1     if country=="Austria" & year==2009 & month==4
{txt}(3,472 real changes made)

{com}. replace presub11a=1     if country=="Austria" & year==2009 & month==5
{txt}(3,472 real changes made)

{com}. replace presub10a=1     if country=="Austria" & year==2009 & month==6
{txt}(3,472 real changes made)

{com}. replace presub9a=1              if country=="Austria" & year==2009 & month==7   
{txt}(3,472 real changes made)

{com}. replace presub8a=1              if country=="Austria" & year==2009 & month==8   
{txt}(3,472 real changes made)

{com}. replace presub7a=1              if country=="Austria" & year==2009 & month==9   
{txt}(3,472 real changes made)

{com}. replace presub6a=1              if country=="Austria" & year==2009 & month==10  
{txt}(3,472 real changes made)

{com}. replace presub5a=1              if country=="Austria" & year==2009 & month==11  
{txt}(3,472 real changes made)

{com}. replace presub4a=1              if country=="Austria" & year==2009 & month==12  
{txt}(3,472 real changes made)

{com}. replace presub3a=1              if country=="Austria" & year==2010 & month==1   
{txt}(3,314 real changes made)

{com}. replace presub2a=1              if country=="Austria" & year==2010 & month==2   
{txt}(3,314 real changes made)

{com}. replace presub1a=1              if country=="Austria" & year==2010 & month==3   
{txt}(3,314 real changes made)

{com}. 
. replace sub1a=1                 if country=="Austria" & year==2010 & month==4   
{txt}(3,314 real changes made)

{com}. replace sub2a=1                 if country=="Austria" & year==2010 & month==5 
{txt}(3,314 real changes made)

{com}.         
.         
. replace postsub1a=1     if country=="Austria" & year==2010 & month==6   
{txt}(3,314 real changes made)

{com}. replace postsub2a=1     if country=="Austria" & year==2010 & month==7   
{txt}(3,314 real changes made)

{com}. replace postsub3a=1     if country=="Austria" & year==2010 & month==8   
{txt}(3,314 real changes made)

{com}. replace postsub4a=1     if country=="Austria" & year==2010 & month==9   
{txt}(3,314 real changes made)

{com}. replace postsub5a=1     if country=="Austria" & year==2010 & month==10  
{txt}(3,314 real changes made)

{com}. replace postsub6a=1     if country=="Austria" & year==2010 & month==11  
{txt}(3,314 real changes made)

{com}. 
. *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
. **AT, FF, 2009: September-December 2009-Program Duration
. 
. 
. gen sub1af9=0
{txt}
{com}. gen sub2af9=0
{txt}
{com}. gen sub3af9=0
{txt}
{com}. gen sub4af9=0
{txt}
{com}. 
. gen presub1af9=0
{txt}
{com}. gen presub2af9=0
{txt}
{com}. gen presub3af9=0
{txt}
{com}. gen presub4af9=0
{txt}
{com}. gen presub5af9=0
{txt}
{com}. gen presub6af9=0
{txt}
{com}. gen presub7af9=0
{txt}
{com}. gen presub8af9=0
{txt}
{com}. gen presub9af9=0
{txt}
{com}. gen presub10af9=0
{txt}
{com}. gen presub11af9=0
{txt}
{com}. gen presub12af9=0
{txt}
{com}. gen presub13af9=0
{txt}
{com}. 
. gen postsub1af9=0
{txt}
{com}. gen postsub2af9=0
{txt}
{com}. gen postsub3af9=0
{txt}
{com}. gen postsub4af9=0
{txt}
{com}. gen postsub5af9=0
{txt}
{com}. gen postsub6af9=0
{txt}
{com}. 
. replace presub13af9=1   if country=="Austria" & year==2008 & month==8   
{txt}(3,055 real changes made)

{com}. replace presub12af9=1   if country=="Austria" & year==2008 & month==9   
{txt}(3,055 real changes made)

{com}. replace presub11af9=1   if country=="Austria" & year==2008 & month==10
{txt}(3,055 real changes made)

{com}. replace presub10af9=1   if country=="Austria" & year==2008 & month==11  
{txt}(3,055 real changes made)

{com}. replace presub9af9=1    if country=="Austria" & year==2008 & month==12  
{txt}(3,055 real changes made)

{com}. replace presub8af9=1    if country=="Austria" & year==2009 & month==1   
{txt}(3,472 real changes made)

{com}. replace presub7af9=1    if country=="Austria" & year==2009 & month==2
{txt}(3,472 real changes made)

{com}. replace presub6af9=1    if country=="Austria" & year==2009 & month==3   
{txt}(3,472 real changes made)

{com}. replace presub5af9=1    if country=="Austria" & year==2009 & month==4
{txt}(3,472 real changes made)

{com}. replace presub4af9=1    if country=="Austria" & year==2009 & month==5   
{txt}(3,472 real changes made)

{com}. replace presub3af9=1    if country=="Austria" & year==2009 & month==6   
{txt}(3,472 real changes made)

{com}. replace presub2af9=1    if country=="Austria" & year==2009 & month==7   
{txt}(3,472 real changes made)

{com}. replace presub1af9=1    if country=="Austria" & year==2009 & month==8   
{txt}(3,472 real changes made)

{com}. 
. replace sub1af9=1               if country=="Austria" & year==2009 & month==9   
{txt}(3,472 real changes made)

{com}. replace sub2af9=1               if country=="Austria" & year==2009 & month==10  
{txt}(3,472 real changes made)

{com}. replace sub3af9=1               if country=="Austria" & year==2009 & month==11  
{txt}(3,472 real changes made)

{com}. replace sub4af9=1               if country=="Austria" & year==2009 & month==12  
{txt}(3,472 real changes made)

{com}. 
. replace postsub1af9=1   if country=="Austria" & year==2010 & month==1   
{txt}(3,314 real changes made)

{com}. replace postsub2af9=1   if country=="Austria" & year==2010 & month==2   
{txt}(3,314 real changes made)

{com}. replace postsub3af9=1   if country=="Austria" & year==2010 & month==3   
{txt}(3,314 real changes made)

{com}. replace postsub4af9=1   if country=="Austria" & year==2010 & month==4   
{txt}(3,314 real changes made)

{com}. replace postsub5af9=1   if country=="Austria" & year==2010 & month==5   
{txt}(3,314 real changes made)

{com}. replace postsub6af9=1   if country=="Austria" & year==2010 & month==6  
{txt}(3,314 real changes made)

{com}. 
. *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
. **AT, FF, 2010: September-November 2010-Program Duration
. 
. gen sub1af10=0
{txt}
{com}. gen sub2af10=0
{txt}
{com}. gen sub3af10=0
{txt}
{com}. 
. gen presub1af10=0
{txt}
{com}. gen presub2af10=0
{txt}
{com}. gen presub3af10=0
{txt}
{com}. gen presub4af10=0
{txt}
{com}. gen presub5af10=0
{txt}
{com}. gen presub6af10=0
{txt}
{com}. gen presub7af10=0
{txt}
{com}. gen presub8af10=0
{txt}
{com}. gen presub9af10=0
{txt}
{com}. gen presub10af10=0
{txt}
{com}. gen presub11af10=0
{txt}
{com}. gen presub12af10=0
{txt}
{com}. gen presub13af10=0
{txt}
{com}. 
. 
. gen postsub1af10=0
{txt}
{com}. gen postsub2af10=0
{txt}
{com}. gen postsub3af10=0
{txt}
{com}. gen postsub4af10=0
{txt}
{com}. gen postsub5af10=0
{txt}
{com}. gen postsub6af10=0
{txt}
{com}. 
. replace presub13af10=1          if country=="Austria" & year==2009 & month==8  
{txt}(3,472 real changes made)

{com}. replace presub12af10=1          if country=="Austria" & year==2009 & month==9  
{txt}(3,472 real changes made)

{com}. replace presub11af10=1          if country=="Austria" & year==2009 & month==10
{txt}(3,472 real changes made)

{com}. replace presub10af10=1          if country=="Austria" & year==2009 & month==11   
{txt}(3,472 real changes made)

{com}. replace presub9af10=1           if country=="Austria" & year==2009 & month==12   
{txt}(3,472 real changes made)

{com}. replace presub8af10=1           if country=="Austria" & year==2010 & month==1   
{txt}(3,314 real changes made)

{com}. replace presub7af10=1           if country=="Austria" & year==2010 & month==2   
{txt}(3,314 real changes made)

{com}. replace presub6af10=1           if country=="Austria" & year==2010 & month==3   
{txt}(3,314 real changes made)

{com}. replace presub5af10=1           if country=="Austria" & year==2010 & month==4 
{txt}(3,314 real changes made)

{com}. replace presub4af10=1           if country=="Austria" & year==2010 & month==5   
{txt}(3,314 real changes made)

{com}. replace presub3af10=1           if country=="Austria" & year==2010 & month==6   
{txt}(3,314 real changes made)

{com}. replace presub2af10=1           if country=="Austria" & year==2010 & month==7   
{txt}(3,314 real changes made)

{com}. replace presub1af10=1           if country=="Austria" & year==2010 & month==8   
{txt}(3,314 real changes made)

{com}. 
. replace sub1af10=1                      if country=="Austria" & year==2010 & month==9   
{txt}(3,314 real changes made)

{com}. replace sub2af10=1                      if country=="Austria" & year==2010 & month==10  
{txt}(3,314 real changes made)

{com}. replace sub3af10=1                      if country=="Austria" & year==2010 & month==11  
{txt}(3,314 real changes made)

{com}. 
. replace postsub1af10=1          if country=="Austria" & year==2010 & month==12  
{txt}(3,314 real changes made)

{com}. replace postsub2af10=1          if country=="Austria" & year==2011 & month==1  
{txt}(3,910 real changes made)

{com}. replace postsub3af10=1          if country=="Austria" & year==2011 & month==2   
{txt}(3,910 real changes made)

{com}. replace postsub4af10=1          if country=="Austria" & year==2011 & month==3   
{txt}(3,910 real changes made)

{com}. replace postsub5af10=1          if country=="Austria" & year==2011 & month==4   
{txt}(3,910 real changes made)

{com}. replace postsub6af10=1          if country=="Austria" & year==2011 & month==5
{txt}(3,910 real changes made)

{com}. 
. 
. *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
. 
. **HU,WM,2015: October 2015-January 2016--Program Duration
. 
. gen sub1h=0
{txt}
{com}. gen sub2h=0
{txt}
{com}. gen sub3h=0
{txt}
{com}. gen sub4h=0
{txt}
{com}. 
. gen presub1h=0
{txt}
{com}. gen presub2h=0
{txt}
{com}. gen presub3h=0
{txt}
{com}. gen presub4h=0
{txt}
{com}. gen presub5h=0
{txt}
{com}. gen presub6h=0
{txt}
{com}. gen presub7h=0
{txt}
{com}. gen presub8h=0
{txt}
{com}. gen presub9h=0
{txt}
{com}. gen presub10h=0
{txt}
{com}. gen presub11h=0
{txt}
{com}. gen presub12h=0
{txt}
{com}. gen presub13h=0
{txt}
{com}. 
. 
. gen postsub1h=0
{txt}
{com}. gen postsub2h=0
{txt}
{com}. gen postsub3h=0
{txt}
{com}. gen postsub4h=0
{txt}
{com}. gen postsub5h=0
{txt}
{com}. gen postsub6h=0
{txt}
{com}. 
. replace presub13h=1     if  country=="Hungary" &        year==2014 & month==9   
{txt}(2,638 real changes made)

{com}. replace presub12h=1     if  country=="Hungary" &        year==2014 & month==10  
{txt}(2,638 real changes made)

{com}. replace presub11h=1     if  country=="Hungary" &        year==2014 & month==11  
{txt}(2,638 real changes made)

{com}. replace presub10h=1     if  country=="Hungary" &        year==2014 & month==12  
{txt}(2,638 real changes made)

{com}. replace presub9h=1              if  country=="Hungary" &        year==2015 & month==1   
{txt}(2,280 real changes made)

{com}. replace presub8h=1              if  country=="Hungary" &        year==2015 & month==2   
{txt}(2,280 real changes made)

{com}. replace presub7h=1              if  country=="Hungary" &        year==2015 & month==3   
{txt}(2,280 real changes made)

{com}. replace presub6h=1              if  country=="Hungary" &        year==2015 & month==4   
{txt}(2,280 real changes made)

{com}. replace presub5h=1              if  country=="Hungary" &        year==2015 & month==5   
{txt}(2,280 real changes made)

{com}. replace presub4h=1              if  country=="Hungary" &        year==2015 & month==6   
{txt}(2,280 real changes made)

{com}. replace presub3h=1              if  country=="Hungary" &        year==2015 & month==7   
{txt}(2,280 real changes made)

{com}. replace presub2h=1              if  country=="Hungary" &        year==2015 & month==8   
{txt}(2,280 real changes made)

{com}. replace presub1h=1              if  country=="Hungary" &        year==2015 & month==9   
{txt}(2,280 real changes made)

{com}. 
. replace sub1h=1                 if  country=="Hungary" &        year==2015 & month==10  
{txt}(2,280 real changes made)

{com}. replace sub2h=1                 if  country=="Hungary" &        year==2015 & month==11  
{txt}(2,280 real changes made)

{com}. replace sub3h=1                 if  country=="Hungary" &        year==2015 & month==12  
{txt}(2,280 real changes made)

{com}. replace sub4h=1                 if  country=="Hungary" &        year==2016 & month==1   
{txt}(2,262 real changes made)

{com}. 
. replace postsub1h=1     if  country=="Hungary" &        year==2016 & month==2   
{txt}(2,262 real changes made)

{com}. replace postsub2h=1     if  country=="Hungary" &        year==2016 & month==3   
{txt}(2,262 real changes made)

{com}. replace postsub3h=1     if  country=="Hungary" &        year==2016 & month==4   
{txt}(2,262 real changes made)

{com}. replace postsub4h=1     if  country=="Hungary" &        year==2016 & month==5   
{txt}(2,262 real changes made)

{com}. replace postsub5h=1     if  country=="Hungary" &        year==2016 & month==6   
{txt}(2,262 real changes made)

{com}. replace postsub6h=1     if  country=="Hungary" &        year==2016 & month==7
{txt}(2,262 real changes made)

{com}. 
. *+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
. 
. **HU,FF,2016: September-December 2016--Program Duration
. gen sub1hf=0
{txt}
{com}. gen sub2hf=0
{txt}
{com}. gen sub3hf=0
{txt}
{com}. gen sub4hf=0
{txt}
{com}. 
. gen presub1hf=0
{txt}
{com}. gen presub2hf=0
{txt}
{com}. gen presub3hf=0
{txt}
{com}. gen presub4hf=0
{txt}
{com}. gen presub5hf=0
{txt}
{com}. gen presub6hf=0
{txt}
{com}. gen presub7hf=0
{txt}
{com}. gen presub8hf=0
{txt}
{com}. gen presub9hf=0
{txt}
{com}. gen presub10hf=0
{txt}
{com}. gen presub11hf=0
{txt}
{com}. gen presub12hf=0
{txt}
{com}. gen presub13hf=0
{txt}
{com}. 
. 
. gen postsub1hf=0
{txt}
{com}. gen postsub2hf=0
{txt}
{com}. gen postsub3hf=0
{txt}
{com}. gen postsub4hf=0
{txt}
{com}. gen postsub5hf=0
{txt}
{com}. gen postsub6hf=0
{txt}
{com}. 
. replace presub13hf=1    if  country=="Hungary" &        year==2015 & month==8   
{txt}(2,280 real changes made)

{com}. replace presub12hf=1    if  country=="Hungary" &        year==2015 & month==9   
{txt}(2,280 real changes made)

{com}. replace presub11hf=1    if  country=="Hungary" &        year==2015 & month==10
{txt}(2,280 real changes made)

{com}. replace presub10hf=1    if  country=="Hungary" &        year==2015 & month==11  
{txt}(2,280 real changes made)

{com}. replace presub9hf=1     if  country=="Hungary" &        year==2015 & month==12  
{txt}(2,280 real changes made)

{com}. replace presub8hf=1     if  country=="Hungary" &        year==2016 & month==1   
{txt}(2,262 real changes made)

{com}. replace presub7hf=1     if  country=="Hungary" &        year==2016 & month==2
{txt}(2,262 real changes made)

{com}. replace presub6hf=1     if  country=="Hungary" &        year==2016 & month==3   
{txt}(2,262 real changes made)

{com}. replace presub5hf=1     if  country=="Hungary" &        year==2016 & month==4
{txt}(2,262 real changes made)

{com}. replace presub4hf=1     if  country=="Hungary" &        year==2016 & month==5   
{txt}(2,262 real changes made)

{com}. replace presub3hf=1     if  country=="Hungary" &        year==2016 & month==6   
{txt}(2,262 real changes made)

{com}. replace presub2hf=1     if  country=="Hungary" &        year==2016 & month==7   
{txt}(2,262 real changes made)

{com}. replace presub1hf=1     if  country=="Hungary" &        year==2016 & month==8   
{txt}(2,262 real changes made)

{com}. 
. replace sub1hf=1                if  country=="Hungary" &        year==2016 & month==9   
{txt}(2,262 real changes made)

{com}. replace sub2hf=1                if  country=="Hungary" &        year==2016 & month==10  
{txt}(2,262 real changes made)

{com}. replace sub3hf=1                if  country=="Hungary" &        year==2016 & month==11  
{txt}(2,262 real changes made)

{com}. replace sub4hf=1                if  country=="Hungary" &        year==2016 & month==12  
{txt}(2,262 real changes made)

{com}. 
. replace postsub1hf=1    if  country=="Hungary" &        year==2017 & month==1   
{txt}(1,158 real changes made)

{com}. *Note: The last date in the data is January 2017. Longer post-program window is not possible.
. 
. *******************************************************************************************************************
. *************************************MINIMAL DATA CLEAN************************************************************
. *******************************************************************************************************************
. drop if id==""
{txt}(2,009 observations deleted)

{com}. 
. replace price=. if price<0      & price!=.
{txt}(0 real changes made)

{com}. replace price=. if price==0 & price!=.
{txt}(70,536 real changes made, 70,536 to missing)

{com}. 
. replace units=. if units<0      & units!=.
{txt}(67 real changes made, 67 to missing)

{com}. replace units=. if units<2  & units!=.
{txt}(430,299 real changes made, 430,299 to missing)

{com}. 
. replace annual_energy_consumption="" if annual_energy_consumption=="n.a."
{txt}(257,076 real changes made)

{com}. replace annual_energy_consumption="" if annual_energy_consumption=="unknown"
{txt}(131,436 real changes made)

{com}. replace annual_energy_consumption="" if annual_energy_consumption=="0"
{txt}(552 real changes made)

{com}. replace annual_energy_consumption="" if annual_energy_consumption=="1"
{txt}(72 real changes made)

{com}. replace annual_energy_consumption="" if annual_energy_consumption=="2"
{txt}(0 real changes made)

{com}. replace annual_energy_consumption="" if annual_energy_consumption=="8500"
{txt}(24 real changes made)

{com}. replace annual_energy_consumption="" if annual_energy_consumption=="9999"
{txt}(0 real changes made)

{com}. destring annual_energy_consumption, replace
{txt}annual_energy_consumption: all characters numeric; {res}replaced {txt}as {res}double
{txt}(389208 missing values generated)
{res}{txt}
{com}. 
. 
. 
. egen id1=group(id country)
{txt}
{com}. xtset id1 date
{res}
{col 1}{txt:Panel variable: }{res:id1}{txt: (unbalanced)}
{p 1 16 2}{txt:Time variable: }{res:date}{txt:, }{res:{bind:2004m1}}{txt: to }{res:{bind:2017m1}}{txt:, but with gaps}{p_end}
{txt}{col 10}Delta: {res}1 month
{txt}
{com}. 
. gen logunits=ln(units)
{txt}(1,219,128 missing values generated)

{com}. gen logprice=ln(price)
{txt}(978,322 missing values generated)

{com}. gen dlogunits=d.logunits
{txt}(1,406,895 missing values generated)

{com}. gen dlogprice=d.logprice
{txt}(1,196,150 missing values generated)

{com}. 
. ***Country-month and country-year dummies
. egen cmd=group(country month)
{txt}
{com}. tabulate cmd, gen(cm)

{txt}group(count {c |}
  ry month) {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}     42,947        1.71        1.71
{txt}          2 {c |}{res}     40,625        1.62        3.33
{txt}          3 {c |}{res}     40,625        1.62        4.94
{txt}          4 {c |}{res}     40,625        1.62        6.56
{txt}          5 {c |}{res}     40,625        1.62        8.17
{txt}          6 {c |}{res}     40,625        1.62        9.79
{txt}          7 {c |}{res}     40,625        1.62       11.41
{txt}          8 {c |}{res}     40,625        1.62       13.02
{txt}          9 {c |}{res}     40,625        1.62       14.64
{txt}         10 {c |}{res}     40,625        1.62       16.26
{txt}         11 {c |}{res}     40,625        1.62       17.87
{txt}         12 {c |}{res}     40,625        1.62       19.49
{txt}         13 {c |}{res}     15,767        0.63       20.12
{txt}         14 {c |}{res}     15,131        0.60       20.72
{txt}         15 {c |}{res}     15,131        0.60       21.32
{txt}         16 {c |}{res}     15,131        0.60       21.92
{txt}         17 {c |}{res}     15,131        0.60       22.52
{txt}         18 {c |}{res}     15,131        0.60       23.13
{txt}         19 {c |}{res}     15,131        0.60       23.73
{txt}         20 {c |}{res}     15,131        0.60       24.33
{txt}         21 {c |}{res}     15,131        0.60       24.93
{txt}         22 {c |}{res}     15,131        0.60       25.53
{txt}         23 {c |}{res}     15,131        0.60       26.14
{txt}         24 {c |}{res}     15,131        0.60       26.74
{txt}         25 {c |}{res}     33,681        1.34       28.08
{txt}         26 {c |}{res}     32,305        1.29       29.36
{txt}         27 {c |}{res}     32,305        1.29       30.65
{txt}         28 {c |}{res}     32,305        1.29       31.93
{txt}         29 {c |}{res}     32,305        1.29       33.22
{txt}         30 {c |}{res}     32,305        1.29       34.51
{txt}         31 {c |}{res}     32,305        1.29       35.79
{txt}         32 {c |}{res}     32,305        1.29       37.08
{txt}         33 {c |}{res}     32,305        1.29       38.36
{txt}         34 {c |}{res}     32,305        1.29       39.65
{txt}         35 {c |}{res}     32,305        1.29       40.93
{txt}         36 {c |}{res}     32,305        1.29       42.22
{txt}         37 {c |}{res}     46,266        1.84       44.06
{txt}         38 {c |}{res}     43,853        1.74       45.80
{txt}         39 {c |}{res}     43,853        1.74       47.55
{txt}         40 {c |}{res}     43,853        1.74       49.29
{txt}         41 {c |}{res}     43,853        1.74       51.04
{txt}         42 {c |}{res}     43,853        1.74       52.78
{txt}         43 {c |}{res}     43,853        1.74       54.53
{txt}         44 {c |}{res}     43,853        1.74       56.27
{txt}         45 {c |}{res}     43,853        1.74       58.02
{txt}         46 {c |}{res}     43,853        1.74       59.76
{txt}         47 {c |}{res}     43,853        1.74       61.51
{txt}         48 {c |}{res}     43,853        1.74       63.25
{txt}         49 {c |}{res}     27,140        1.08       64.33
{txt}         50 {c |}{res}     25,984        1.03       65.36
{txt}         51 {c |}{res}     25,984        1.03       66.40
{txt}         52 {c |}{res}     25,984        1.03       67.43
{txt}         53 {c |}{res}     25,984        1.03       68.47
{txt}         54 {c |}{res}     25,984        1.03       69.50
{txt}         55 {c |}{res}     25,984        1.03       70.53
{txt}         56 {c |}{res}     25,984        1.03       71.57
{txt}         57 {c |}{res}     25,984        1.03       72.60
{txt}         58 {c |}{res}     25,984        1.03       73.63
{txt}         59 {c |}{res}     25,984        1.03       74.67
{txt}         60 {c |}{res}     25,984        1.03       75.70
{txt}         61 {c |}{res}     25,047        1.00       76.70
{txt}         62 {c |}{res}     24,010        0.96       77.65
{txt}         63 {c |}{res}     24,010        0.96       78.61
{txt}         64 {c |}{res}     24,010        0.96       79.57
{txt}         65 {c |}{res}     24,010        0.96       80.52
{txt}         66 {c |}{res}     24,010        0.96       81.48
{txt}         67 {c |}{res}     24,010        0.96       82.43
{txt}         68 {c |}{res}     24,010        0.96       83.39
{txt}         69 {c |}{res}     24,010        0.96       84.34
{txt}         70 {c |}{res}     24,010        0.96       85.30
{txt}         71 {c |}{res}     24,010        0.96       86.25
{txt}         72 {c |}{res}     24,010        0.96       87.21
{txt}         73 {c |}{res}      9,710        0.39       87.59
{txt}         74 {c |}{res}      9,246        0.37       87.96
{txt}         75 {c |}{res}      9,246        0.37       88.33
{txt}         76 {c |}{res}      9,246        0.37       88.70
{txt}         77 {c |}{res}      9,246        0.37       89.07
{txt}         78 {c |}{res}      9,246        0.37       89.43
{txt}         79 {c |}{res}      9,246        0.37       89.80
{txt}         80 {c |}{res}      9,246        0.37       90.17
{txt}         81 {c |}{res}      9,246        0.37       90.54
{txt}         82 {c |}{res}      9,246        0.37       90.90
{txt}         83 {c |}{res}      9,246        0.37       91.27
{txt}         84 {c |}{res}      9,246        0.37       91.64
{txt}         85 {c |}{res}     18,082        0.72       92.36
{txt}         86 {c |}{res}     17,457        0.69       93.05
{txt}         87 {c |}{res}     17,457        0.69       93.75
{txt}         88 {c |}{res}     17,457        0.69       94.44
{txt}         89 {c |}{res}     17,457        0.69       95.14
{txt}         90 {c |}{res}     17,457        0.69       95.83
{txt}         91 {c |}{res}     17,457        0.69       96.53
{txt}         92 {c |}{res}     17,457        0.69       97.22
{txt}         93 {c |}{res}     17,457        0.69       97.92
{txt}         94 {c |}{res}     17,457        0.69       98.61
{txt}         95 {c |}{res}     17,457        0.69       99.31
{txt}         96 {c |}{res}     17,457        0.69      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}  2,513,361      100.00
{txt}
{com}. 
. egen cyd=group(country year)
{txt}
{com}. tabulate cyd, gen(cy)

{txt}group(count {c |}
   ry year) {c |}      Freq.     Percent        Cum.
{hline 12}{c +}{hline 35}
          1 {c |}{res}      3,660        0.15        0.15
{txt}          2 {c |}{res}     11,376        0.45        0.60
{txt}          3 {c |}{res}     22,608        0.90        1.50
{txt}          4 {c |}{res}     30,648        1.22        2.72
{txt}          5 {c |}{res}     36,624        1.46        4.17
{txt}          6 {c |}{res}     41,628        1.66        5.83
{txt}          7 {c |}{res}     39,732        1.58        7.41
{txt}          8 {c |}{res}     46,884        1.87        9.28
{txt}          9 {c |}{res}     50,064        1.99       11.27
{txt}         10 {c |}{res}     49,884        1.98       13.25
{txt}         11 {c |}{res}     49,908        1.99       15.24
{txt}         12 {c |}{res}     51,312        2.04       17.28
{txt}         13 {c |}{res}     53,172        2.12       19.40
{txt}         14 {c |}{res}      2,322        0.09       19.49
{txt}         15 {c |}{res}      1,944        0.08       19.57
{txt}         16 {c |}{res}      6,420        0.26       19.82
{txt}         17 {c |}{res}      8,748        0.35       20.17
{txt}         18 {c |}{res}      9,576        0.38       20.55
{txt}         19 {c |}{res}     13,920        0.55       21.10
{txt}         20 {c |}{res}     14,172        0.56       21.67
{txt}         21 {c |}{res}     16,596        0.66       22.33
{txt}         22 {c |}{res}     17,496        0.70       23.02
{txt}         23 {c |}{res}     20,460        0.81       23.84
{txt}         24 {c |}{res}     20,712        0.82       24.66
{txt}         25 {c |}{res}     18,168        0.72       25.39
{txt}         26 {c |}{res}     16,740        0.67       26.05
{txt}         27 {c |}{res}     16,620        0.66       26.71
{txt}         28 {c |}{res}        636        0.03       26.74
{txt}         29 {c |}{res}     12,624        0.50       27.24
{txt}         30 {c |}{res}     19,020        0.76       28.00
{txt}         31 {c |}{res}     25,572        1.02       29.01
{txt}         32 {c |}{res}     27,696        1.10       30.12
{txt}         33 {c |}{res}     29,400        1.17       31.29
{txt}         34 {c |}{res}     32,232        1.28       32.57
{txt}         35 {c |}{res}     33,720        1.34       33.91
{txt}         36 {c |}{res}     34,824        1.39       35.30
{txt}         37 {c |}{res}     38,052        1.51       36.81
{txt}         38 {c |}{res}     36,516        1.45       38.26
{txt}         39 {c |}{res}     34,992        1.39       39.66
{txt}         40 {c |}{res}     32,208        1.28       40.94
{txt}         41 {c |}{res}     30,804        1.23       42.16
{txt}         42 {c |}{res}      1,376        0.05       42.22
{txt}         43 {c |}{res}     11,172        0.44       42.66
{txt}         44 {c |}{res}     19,812        0.79       43.45
{txt}         45 {c |}{res}     28,848        1.15       44.60
{txt}         46 {c |}{res}     34,212        1.36       45.96
{txt}         47 {c |}{res}     39,360        1.57       47.52
{txt}         48 {c |}{res}     43,740        1.74       49.27
{txt}         49 {c |}{res}     41,280        1.64       50.91
{txt}         50 {c |}{res}     47,892        1.91       52.81
{txt}         51 {c |}{res}     50,484        2.01       54.82
{txt}         52 {c |}{res}     49,932        1.99       56.81
{txt}         53 {c |}{res}     52,128        2.07       58.88
{txt}         54 {c |}{res}     53,244        2.12       61.00
{txt}         55 {c |}{res}     54,132        2.15       63.15
{txt}         56 {c |}{res}      2,413        0.10       63.25
{txt}         57 {c |}{res}      7,068        0.28       63.53
{txt}         58 {c |}{res}     14,184        0.56       64.10
{txt}         59 {c |}{res}     20,448        0.81       64.91
{txt}         60 {c |}{res}     23,232        0.92       65.83
{txt}         61 {c |}{res}     24,888        0.99       66.82
{txt}         62 {c |}{res}     26,412        1.05       67.88
{txt}         63 {c |}{res}     24,900        0.99       68.87
{txt}         64 {c |}{res}     24,864        0.99       69.86
{txt}         65 {c |}{res}     29,532        1.18       71.03
{txt}         66 {c |}{res}     30,156        1.20       72.23
{txt}         67 {c |}{res}     31,644        1.26       73.49
{txt}         68 {c |}{res}     27,348        1.09       74.58
{txt}         69 {c |}{res}     27,132        1.08       75.66
{txt}         70 {c |}{res}      1,156        0.05       75.70
{txt}         71 {c |}{res}      2,328        0.09       75.80
{txt}         72 {c |}{res}      6,948        0.28       76.07
{txt}         73 {c |}{res}     14,112        0.56       76.63
{txt}         74 {c |}{res}     19,128        0.76       77.39
{txt}         75 {c |}{res}     24,048        0.96       78.35
{txt}         76 {c |}{res}     26,100        1.04       79.39
{txt}         77 {c |}{res}     27,240        1.08       80.47
{txt}         78 {c |}{res}     28,476        1.13       81.61
{txt}         79 {c |}{res}     31,044        1.24       82.84
{txt}         80 {c |}{res}     30,180        1.20       84.04
{txt}         81 {c |}{res}     29,904        1.19       85.23
{txt}         82 {c |}{res}     25,608        1.02       86.25
{txt}         83 {c |}{res}     23,004        0.92       87.17
{txt}         84 {c |}{res}      1,037        0.04       87.21
{txt}         85 {c |}{res}     11,280        0.45       87.66
{txt}         86 {c |}{res}     12,168        0.48       88.14
{txt}         87 {c |}{res}     13,116        0.52       88.66
{txt}         88 {c |}{res}     11,856        0.47       89.13
{txt}         89 {c |}{res}     13,320        0.53       89.66
{txt}         90 {c |}{res}     12,468        0.50       90.16
{txt}         91 {c |}{res}     12,828        0.51       90.67
{txt}         92 {c |}{res}     12,084        0.48       91.15
{txt}         93 {c |}{res}     11,832        0.47       91.62
{txt}         94 {c |}{res}        464        0.02       91.64
{txt}         95 {c |}{res}      8,412        0.33       91.98
{txt}         96 {c |}{res}     12,828        0.51       92.49
{txt}         97 {c |}{res}     13,932        0.55       93.04
{txt}         98 {c |}{res}     14,940        0.59       93.63
{txt}         99 {c |}{res}     16,944        0.67       94.31
{txt}        100 {c |}{res}     17,808        0.71       95.02
{txt}        101 {c |}{res}     18,360        0.73       95.75
{txt}        102 {c |}{res}     18,180        0.72       96.47
{txt}        103 {c |}{res}     19,788        0.79       97.26
{txt}        104 {c |}{res}     19,200        0.76       98.02
{txt}        105 {c |}{res}     17,040        0.68       98.70
{txt}        106 {c |}{res}     16,380        0.65       99.35
{txt}        107 {c |}{res}     15,672        0.62       99.98
{txt}        108 {c |}{res}        625        0.02      100.00
{txt}{hline 12}{c +}{hline 35}
      Total {c |}{res}  2,513,361      100.00
{txt}
{com}. 
. by id country, sort: egen       firstyear       =min(year)
{txt}
{com}. by id country, sort: egen       firstdate       =min(date)
{txt}
{com}. by id country, sort: gen        mage            =date-firstdate+1
{txt}
{com}. gen mage2=mage*mage
{txt}
{com}. 
. egen id2=group(id date)
{txt}
{com}. 
. 
. 
. save "R:\WSV2\TBu_BMa\Subsidies Project\Data Subsidies\Estimation Sample.dta", replace 
{txt}{p 0 4 2}
file {bf}
R:\WSV2\TBu_BMa\Subsidies Project\Data Subsidies\Estimation Sample.dta{rm}
saved
{p_end}

{com}. 
. log close
      {txt}name:  {res}<unnamed>
       {txt}log:  {res}R:\WSV2\TBu_BMa\Subsidies Project\Results\Identifying_Treated_Models.smcl
  {txt}log type:  {res}smcl
 {txt}closed on:  {res}15 Sep 2023, 10:52:53
{txt}{.-}
{smcl}
{txt}{sf}{ul off}